diff --git a/frontend/lib/registry/pop-components/pop-search/PopSearchComponent.tsx b/frontend/lib/registry/pop-components/pop-search/PopSearchComponent.tsx index 752f57ec..f8d803d3 100644 --- a/frontend/lib/registry/pop-components/pop-search/PopSearchComponent.tsx +++ b/frontend/lib/registry/pop-components/pop-search/PopSearchComponent.tsx @@ -799,8 +799,8 @@ function ModalDialog({ open, onOpenChange, modalConfig, title, onSelect }: Modal ); } - // 필터 탭 (초성/알파벳) 적용 - if (activeFilterTab && displayField) { + // 필터 탭 (초성/알파벳) 적용 — 검색어 입력 시에는 전체 범위에서 검색 + if (activeFilterTab && displayField && !searchText.trim()) { items = items.filter((row) => { const val = row[displayField]; if (val == null) return false; @@ -812,9 +812,9 @@ function ModalDialog({ open, onOpenChange, modalConfig, title, onSelect }: Modal return items; }, [allRows, searchText, searchColumns, colsToShow, searchMode, activeFilterTab, displayField]); - // 그룹화 (필터 탭 활성화 시) + // 그룹화 (필터 탭 활성화 시, 검색어 없을 때만) const groupedRows = useMemo(() => { - if (!activeFilterTab || !displayField) return null; + if (!activeFilterTab || !displayField || searchText.trim()) return null; const groups = new Map[]>(); for (const row of filteredRows) { @@ -828,7 +828,7 @@ function ModalDialog({ open, onOpenChange, modalConfig, title, onSelect }: Modal // 정렬 const sorted = [...groups.entries()].sort(([a], [b]) => a.localeCompare(b, "ko")); return sorted; - }, [filteredRows, activeFilterTab, displayField]); + }, [filteredRows, activeFilterTab, displayField, searchText]); const handleSearchChange = (e: React.ChangeEvent) => { const v = e.target.value;