From 1cf2c63b7bc21eb0e6f80f7c9e7ee2ed0ee9db93 Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Tue, 30 Dec 2025 18:58:23 +0100 Subject: [PATCH] fix: update grid button references for duplication functionality --- frappe/public/js/frappe/form/grid.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/frappe/public/js/frappe/form/grid.js b/frappe/public/js/frappe/form/grid.js index b97b2d9575..870d2ced12 100644 --- a/frappe/public/js/frappe/form/grid.js +++ b/frappe/public/js/frappe/form/grid.js @@ -137,7 +137,6 @@ export default class Grid { this.remove_rows_button = this.grid_buttons.find(".grid-remove-rows"); this.duplicate_rows_button = this.grid_buttons.find(".grid-duplicate-rows"); this.remove_all_rows_button = this.grid_buttons.find(".grid-remove-all-rows"); - this.duplicate_row_button = this.grid_buttons.find(".grid-duplicate-row"); this.setup_allow_bulk_edit(); this.setup_check(); @@ -369,7 +368,7 @@ export default class Grid { return; } - this.duplicate_row_button.toggleClass( + this.duplicate_rows_button.toggleClass( "hidden", this.wrapper.find(".grid-body .grid-row-check:checked:first").length ? false : true ); @@ -578,7 +577,7 @@ export default class Grid { ) { // add 'hidden' to buttons this.wrapper - .find(".grid-add-row, .grid-add-multiple-rows, .grid-duplicate-row") + .find(".grid-add-row, .grid-add-multiple-rows, .grid-duplicate-rows") .addClass("hidden"); } else { // show buttons