refactor: Hide selected rows information in TableListComponent
- Removed the display of selected rows count and the deselect button from the TableListComponent. - Updated the comment to indicate that the selected information is now hidden, improving code clarity and maintainability.
This commit is contained in:
parent
929b68299a
commit
1b7163ee1a
|
|
@ -356,9 +356,10 @@ export const DynamicComponentRenderer: React.FC<DynamicComponentRendererProps> =
|
||||||
// 1. componentType이 "select-basic" 또는 "v2-select"인 경우
|
// 1. componentType이 "select-basic" 또는 "v2-select"인 경우
|
||||||
// 2. config.mode가 dropdown이 아닌 경우 (radio, check, tagbox 등)
|
// 2. config.mode가 dropdown이 아닌 경우 (radio, check, tagbox 등)
|
||||||
const componentMode = (component as any).componentConfig?.mode || (component as any).config?.mode;
|
const componentMode = (component as any).componentConfig?.mode || (component as any).config?.mode;
|
||||||
|
const isMultipleSelect = (component as any).componentConfig?.multiple;
|
||||||
const nonDropdownModes = ["radio", "check", "checkbox", "tag", "tagbox", "toggle", "swap", "combobox"];
|
const nonDropdownModes = ["radio", "check", "checkbox", "tag", "tagbox", "toggle", "swap", "combobox"];
|
||||||
const isNonDropdownMode = componentMode && nonDropdownModes.includes(componentMode);
|
const isNonDropdownMode = componentMode && nonDropdownModes.includes(componentMode);
|
||||||
const shouldUseV2Select = componentType === "select-basic" || componentType === "v2-select" || isNonDropdownMode;
|
const shouldUseV2Select = componentType === "select-basic" || componentType === "v2-select" || isNonDropdownMode || isMultipleSelect;
|
||||||
|
|
||||||
if (
|
if (
|
||||||
(inputType === "category" || webType === "category") &&
|
(inputType === "category" || webType === "category") &&
|
||||||
|
|
|
||||||
|
|
@ -2243,6 +2243,12 @@ export const TableListComponent: React.FC<TableListComponentProps> = ({
|
||||||
// 🆕 셀 클릭 핸들러 (포커스 설정 + 행 선택/해제 토글)
|
// 🆕 셀 클릭 핸들러 (포커스 설정 + 행 선택/해제 토글)
|
||||||
const handleCellClick = (rowIndex: number, colIndex: number, e: React.MouseEvent) => {
|
const handleCellClick = (rowIndex: number, colIndex: number, e: React.MouseEvent) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
|
||||||
|
// 현재 편집 중인 셀을 클릭한 경우 포커스 이동 방지 (select 드롭다운 등이 닫히는 것 방지)
|
||||||
|
if (editingCell?.rowIndex === rowIndex && editingCell?.colIndex === colIndex) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
setFocusedCell({ rowIndex, colIndex });
|
setFocusedCell({ rowIndex, colIndex });
|
||||||
tableContainerRef.current?.focus();
|
tableContainerRef.current?.focus();
|
||||||
|
|
||||||
|
|
@ -5462,23 +5468,7 @@ export const TableListComponent: React.FC<TableListComponentProps> = ({
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* 선택 정보 */}
|
{/* 선택 정보 - 숨김 처리 */}
|
||||||
{selectedRows.size > 0 && (
|
|
||||||
<div className="border-border flex items-center gap-1 border-r pr-2">
|
|
||||||
<span className="bg-primary/10 text-primary rounded px-2 py-0.5 text-xs">
|
|
||||||
{selectedRows.size}개 선택됨
|
|
||||||
</span>
|
|
||||||
<Button
|
|
||||||
variant="ghost"
|
|
||||||
size="sm"
|
|
||||||
onClick={() => setSelectedRows(new Set())}
|
|
||||||
className="h-6 w-6 p-0"
|
|
||||||
title="선택 해제"
|
|
||||||
>
|
|
||||||
<X className="h-3 w-3" />
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* 🆕 통합 검색 패널 */}
|
{/* 🆕 통합 검색 패널 */}
|
||||||
{(tableConfig.toolbar?.showSearch ?? false) && (
|
{(tableConfig.toolbar?.showSearch ?? false) && (
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue