From 40346a2a78f61f83b96b859330af39630f7ba7c2 Mon Sep 17 00:00:00 2001 From: Elia Schito Date: Wed, 29 Nov 2023 18:54:36 +0100 Subject: [PATCH] If no rows are visible the select-all checkbox should stay unselected --- admin/app/components/solidus_admin/ui/table/component.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/app/components/solidus_admin/ui/table/component.js b/admin/app/components/solidus_admin/ui/table/component.js index b6c51efd316..626e72c48d0 100644 --- a/admin/app/components/solidus_admin/ui/table/component.js +++ b/admin/app/components/solidus_admin/ui/table/component.js @@ -150,7 +150,8 @@ export default class extends Controller { checkbox.indeterminate = false checkbox.checked = false - if (selectedRows.length === this.checkboxTargets.length) checkbox.checked = true + if (this.checkboxTargets.length > 0 && selectedRows.length === this.checkboxTargets.length) + checkbox.checked = true else if (selectedRows.length > 0) checkbox.indeterminate = true }) }