mirror of
https://github.com/frappe/books.git
synced 2025-01-12 11:04:12 +00:00
fix: Renumber rows when they are changed
This commit is contained in:
parent
6076b4f966
commit
1980e5e26f
@ -75,9 +75,10 @@ module.exports = class BaseDocument extends Observable {
|
|||||||
|
|
||||||
if (Array.isArray(value)) {
|
if (Array.isArray(value)) {
|
||||||
this[fieldname] = [];
|
this[fieldname] = [];
|
||||||
for (let row of value) {
|
value.forEach((row, i) => {
|
||||||
this.append(fieldname, row);
|
this.append(fieldname, row);
|
||||||
}
|
row.idx = i;
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
await this.validateField(fieldname, value);
|
await this.validateField(fieldname, value);
|
||||||
this[fieldname] = value;
|
this[fieldname] = value;
|
||||||
|
Loading…
Reference in New Issue
Block a user