diff --git a/frontend/src/features/system/pages/CommonCodeManagementPage.vue b/frontend/src/features/system/pages/CommonCodeManagementPage.vue index f9549c4c..364ec6cc 100644 --- a/frontend/src/features/system/pages/CommonCodeManagementPage.vue +++ b/frontend/src/features/system/pages/CommonCodeManagementPage.vue @@ -236,11 +236,11 @@ const saveMasterBatch = () => { // Inline Child Code Grid Editing Handlers (Top-Row Insertion) const addGridRow = () => { const groupCodeKey = selectedGroupCode.value.groupCode - let list = mockChildCodesMap[groupCodeKey] - if (!list) { - list = [] - Object.assign(mockChildCodesMap, { [groupCodeKey]: list }) + if (!mockChildCodesMap[groupCodeKey]) { + mockChildCodesMap[groupCodeKey] = reactive([]) } + const list = mockChildCodesMap[groupCodeKey] + const newRow: CommonCode = { code: `NEW_CODE_${list.length + 1}`, codeName: 'μƒˆ μ½”λ“œλͺ…', @@ -256,7 +256,11 @@ const addGridRow = () => { selectedGroupCode.value.codeCount = list.length nextTick(() => { - detailGridRef.value?.focusRow(0, 'code') + try { + detailGridRef.value?.focusRow?.(0, 'code') + } catch (e) { + console.warn('focusRow not available', e) + } }) } diff --git a/frontend/src/shared/ui/components/KsDataGrid.vue b/frontend/src/shared/ui/components/KsDataGrid.vue index 7b032a3d..a8ee15d1 100644 --- a/frontend/src/shared/ui/components/KsDataGrid.vue +++ b/frontend/src/shared/ui/components/KsDataGrid.vue @@ -1,22 +1,63 @@ + + + + + +