Merge pull request #36189 from UmakanthKaspa/fix-duplicate-row-btn
fix(grid): hide duplicate row button when cannot_add_rows is true
This commit is contained in:
commit
fc06d5ac24
1 changed files with 5 additions and 2 deletions
|
|
@ -351,7 +351,10 @@ export default class Grid {
|
|||
? false
|
||||
: true;
|
||||
this.remove_rows_button.toggleClass("hidden", show_buttons);
|
||||
this.duplicate_rows_button.toggleClass("hidden", show_buttons);
|
||||
this.duplicate_rows_button.toggleClass(
|
||||
"hidden",
|
||||
show_buttons || this.cannot_add_rows || (this.df && this.df.cannot_add_rows)
|
||||
);
|
||||
|
||||
let select_all_checkbox_checked = this.wrapper.find(
|
||||
".grid-heading-row .grid-row-check:checked:first"
|
||||
|
|
@ -371,7 +374,7 @@ export default class Grid {
|
|||
);
|
||||
|
||||
refresh_duplicate_rows_button() {
|
||||
if (this.df.cannot_add_rows) {
|
||||
if (this.df.cannot_add_rows || (this.df && this.df.cannot_add_rows)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue