Merge pull request #1174 from frappe/mergify/bp/main-hotfix/pr-1173

fix: reorder idx if grid row is reordered (backport #1173)
This commit is contained in:
Shariq Ansari 2025-08-21 11:35:05 +05:30 committed by GitHub
commit 913094dce3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 2 deletions

View File

@ -70,6 +70,7 @@
:delay="isTouchScreenDevice() ? 200 : 0"
group="rows"
item-key="name"
@end="reorder"
>
<template #item="{ element: row, index }">
<div
@ -515,6 +516,13 @@ const deleteRows = () => {
selectedRows.clear()
}
const reorder = () => {
rows.value.forEach((row, index) => {
row.idx = index + 1
})
}
function fieldChange(value, field, row) {
triggerOnChange(field.fieldname, value, row)
}

View File

@ -17,8 +17,8 @@
:label="__('Update')"
icon-left="plus"
variant="solid"
:disabled="!settings.isDirty"
:loading="settings.loading"
:disabled="!document.isDirty"
:loading="document.loading"
@click="updateSettings"
/>
</div>