mirror of
https://github.com/frappe/books.git
synced 2025-01-12 02:59:11 +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)) {
|
||||
this[fieldname] = [];
|
||||
for (let row of value) {
|
||||
value.forEach((row, i) => {
|
||||
this.append(fieldname, row);
|
||||
}
|
||||
row.idx = i;
|
||||
});
|
||||
} else {
|
||||
await this.validateField(fieldname, value);
|
||||
this[fieldname] = value;
|
||||
|
Loading…
Reference in New Issue
Block a user