Revert "Merge pull request #27502 from ljain112/fix-idx-pagination"
This reverts commit9dbe2571cf, reversing changes made tob841a7ccef.
This commit is contained in:
parent
1423f1a136
commit
ad33101164
1 changed files with 6 additions and 12 deletions
|
|
@ -123,7 +123,6 @@ export default class Grid {
|
|||
this.setup_add_row();
|
||||
|
||||
this.setup_grid_pagination();
|
||||
this.update_idx_and_name();
|
||||
|
||||
this.custom_buttons = {};
|
||||
this.grid_buttons = this.wrapper.find(".grid-buttons");
|
||||
|
|
@ -146,17 +145,6 @@ export default class Grid {
|
|||
}
|
||||
}
|
||||
|
||||
update_idx_and_name() {
|
||||
this.data.forEach((d, ri) => {
|
||||
if (d.idx === undefined) {
|
||||
d.idx = ri + 1;
|
||||
}
|
||||
if (d.name === undefined) {
|
||||
d.name = "row " + d.idx;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
set_doc_url() {
|
||||
let unsupported_fieldtypes = frappe.model.no_value_type.filter(
|
||||
(x) => frappe.model.table_fields.indexOf(x) === -1
|
||||
|
|
@ -478,6 +466,12 @@ export default class Grid {
|
|||
if (!d) {
|
||||
return;
|
||||
}
|
||||
if (d.idx === undefined) {
|
||||
d.idx = ri + 1;
|
||||
}
|
||||
if (d.name === undefined) {
|
||||
d.name = "row " + d.idx;
|
||||
}
|
||||
let grid_row;
|
||||
if (this.grid_rows[ri] && !append_row) {
|
||||
grid_row = this.grid_rows[ri];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue