summaryrefslogtreecommitdiff
path: root/lib/tag-numbering/table
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tag-numbering/table')
-rw-r--r--lib/tag-numbering/table/meta-sheet.tsx2
-rw-r--r--lib/tag-numbering/table/tagNumbering-table-toolbar-actions.tsx2
-rw-r--r--lib/tag-numbering/table/tagNumbering-table.tsx10
3 files changed, 12 insertions, 2 deletions
diff --git a/lib/tag-numbering/table/meta-sheet.tsx b/lib/tag-numbering/table/meta-sheet.tsx
index 4221837c..fd14e117 100644
--- a/lib/tag-numbering/table/meta-sheet.tsx
+++ b/lib/tag-numbering/table/meta-sheet.tsx
@@ -64,7 +64,7 @@ export function ViewTagOptions({
setLoading(true)
try {
// 서버 액션 호출 - attributesId와 일치하는 모든 옵션 가져오기
- const optionsData = await fetchTagSubfieldOptions(tagSubfield.attributesId)
+ const optionsData = await fetchTagSubfieldOptions(tagSubfield.attributesId, tagSubfield.projectId)
setOptions(optionsData || [])
} catch (error) {
console.error("Error fetching tag options:", error)
diff --git a/lib/tag-numbering/table/tagNumbering-table-toolbar-actions.tsx b/lib/tag-numbering/table/tagNumbering-table-toolbar-actions.tsx
index 7a14817f..9200e81b 100644
--- a/lib/tag-numbering/table/tagNumbering-table-toolbar-actions.tsx
+++ b/lib/tag-numbering/table/tagNumbering-table-toolbar-actions.tsx
@@ -23,7 +23,7 @@ export function TagNumberingTableToolbarActions({ table }: ItemsTableToolbarActi
setIsLoading(true)
// API 엔드포인트 호출
- const response = await fetch('/api/cron/object-classes')
+ const response = await fetch('/api/cron/tag-types')
if (!response.ok) {
const errorData = await response.json()
diff --git a/lib/tag-numbering/table/tagNumbering-table.tsx b/lib/tag-numbering/table/tagNumbering-table.tsx
index 6ca46e05..847b3eeb 100644
--- a/lib/tag-numbering/table/tagNumbering-table.tsx
+++ b/lib/tag-numbering/table/tagNumbering-table.tsx
@@ -132,17 +132,27 @@ export function TagNumberingTable({ promises }: ItemsTableProps) {
shallow: false,
clearOnDefault: true,
})
+ const [isCompact, setIsCompact] = React.useState<boolean>(false)
+
+ const handleCompactChange = React.useCallback((compact: boolean) => {
+ setIsCompact(compact)
+ }, [])
+
return (
<>
<DataTable
table={table}
+ compact={isCompact}
>
<DataTableAdvancedToolbar
table={table}
filterFields={advancedFilterFields}
shallow={false}
+ enableCompactToggle={true}
+ compactStorageKey="tagNumberingTableCompact"
+ onCompactChange={handleCompactChange}
>
<TagNumberingTableToolbarActions table={table} />
</DataTableAdvancedToolbar>