web/elements: unselect top checkbox in table when not all elements are selected

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2022-12-22 16:02:04 +01:00
parent db0af3763b
commit 7b01a208a2
No known key found for this signature in database
1 changed files with 2 additions and 0 deletions

View File

@ -447,6 +447,8 @@ export abstract class Table<T> extends AKElement {
name="select-all" name="select-all"
type="checkbox" type="checkbox"
aria-label=${t`Select all rows`} aria-label=${t`Select all rows`}
.checked=${this.selectedElements.length ===
this.data?.results.length}
@input=${(ev: InputEvent) => { @input=${(ev: InputEvent) => {
if ((ev.target as HTMLInputElement).checked) { if ((ev.target as HTMLInputElement).checked) {
this.selectedElements = this.selectedElements =