fix(fe): CommonCodeManagementPage - input reset bug on new row edit
Problem: Adding a group row then typing in cells caused continuous reset
Root Cause: Vue reactivity lost when assigning new array to reactive object
Solution: Use Object.assign() to maintain reactivity tracking
- Changed: mockChildCodesMap[key] = list
- To: Object.assign(mockChildCodesMap, { [key]: list })
- Result: Cell input now persists without reset
Affects: /system/common-codes grid editing
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -239,7 +239,7 @@ const addGridRow = () => {
|
||||
let list = mockChildCodesMap[groupCodeKey]
|
||||
if (!list) {
|
||||
list = []
|
||||
mockChildCodesMap[groupCodeKey] = list
|
||||
Object.assign(mockChildCodesMap, { [groupCodeKey]: list })
|
||||
}
|
||||
const newRow: CommonCode = {
|
||||
code: `NEW_CODE_${list.length + 1}`,
|
||||
|
||||
Reference in New Issue
Block a user