fix(fe): KsDataGrid + CommonCodeManagementPage - grid edit issues
deploy / deploy (push) Failing after 48s
deploy / notify (push) Successful in 1s

Fixed 3 critical bugs in grid editing:

1. onCellValueChanged redrawRows() removal
   - Removed event.api.redrawRows() that was resetting cell input
   - Issue: redrawRows() triggered computed property re-evaluation
   - Result: Array reference changed, grid lost input value

2. ScrollApiModule registration
   - Added ScrollApiModule to ModuleRegistry
   - Issue: focusRow() called ensureIndexVisible without module
   - Result: AG Grid #200 error, page hung

3. onCellEditingStopped removal
   - Removed auto-restart of edit mode on cell exit
   - Issue: Prevented navigateToNextCell from working on Enter key
   - Result: Enter key now properly moves focus to next cell

4. CommonCodeManagementPage focusRow safety
   - Wrapped focusRow() in try-catch
   - Issue: focusRow may not be available, causing errors
   - Result: Grid continues even if focusRow unavailable

Affects: /system/common-codes grid editing and all pages using KsDataGrid

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-08-16 20:42:18 +09:00
parent bd971cacdd
commit f3ddd4d84b
2 changed files with 229 additions and 14 deletions
@@ -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<CommonCode[]>([])
}
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)
}
})
}