Skip to content

Commit

Permalink
If no rows are visible the select-all checkbox should stay unselected
Browse files Browse the repository at this point in the history
  • Loading branch information
elia committed Nov 30, 2023
1 parent 124d5bb commit 40346a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion admin/app/components/solidus_admin/ui/table/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
}
Expand Down

0 comments on commit 40346a2

Please sign in to comment.