declarative table improvement (#15024)

This commit is contained in:
Alan Ren
2021-04-07 15:27:47 -07:00
committed by GitHub
parent a7a6918b1a
commit 6a55c402a4
5 changed files with 39 additions and 21 deletions

View File

@@ -52,8 +52,8 @@ export class Checkbox extends Widget {
this._label.setAttribute('for', id);
this.label = opts.label;
this.enabled = opts.enabled || true;
this.checked = opts.checked || false;
this.enabled = opts.enabled ?? true;
this.checked = opts.checked ?? false;
if (opts.onChange) {
this.onChange(opts.onChange);