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

View file

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