Fixed select-all and deselect-all buttons not updating correctly

This commit is contained in:
Lucas Dower 2023-03-11 22:53:28 +00:00
parent a66d859c26
commit 7752b13293
No known key found for this signature in database
GPG Key ID: B3EE6B8499593605

View File

@ -86,7 +86,6 @@ export class PaletteElement extends FullConfigUIElement<Palette, HTMLDivElement>
private _onCountSelectedChanged() {
const countSelected = this.getValue().count();
console.log('countsleected', countSelected, PALETTE_ALL_RELEASE.length);
this._deselectAll.setEnabled(this.enabled && countSelected > 0);
this._selectAll.setEnabled(this.enabled && countSelected < PALETTE_ALL_RELEASE.length);
@ -204,6 +203,7 @@ export class PaletteElement extends FullConfigUIElement<Palette, HTMLDivElement>
} else {
this._palette.remove(checkbox.block);
}
this._onCountSelectedChanged();
});
});