Fix value check. Reset through form caused unexpected value.
This commit is contained in:
@@ -32,6 +32,8 @@ class TpCheckbox extends Inert(ControlState(FormElement(LitElement))) {
|
||||
border-radius: 2px;
|
||||
width: var(--tp-checkbox-width, 18px);
|
||||
height: var(--tp-checkbox-height, 18px);
|
||||
min-width: var(--tp-checkbox-width, 18px);
|
||||
min-height: var(--tp-checkbox-height, 18px);
|
||||
}
|
||||
|
||||
tp-icon {
|
||||
@@ -111,7 +113,7 @@ class TpCheckbox extends Inert(ControlState(FormElement(LitElement))) {
|
||||
}
|
||||
|
||||
get value() {
|
||||
if (this._value !== '') {
|
||||
if (this._value !== '' && this._value !== null && this._value !== undefined) {
|
||||
return this._value;
|
||||
}
|
||||
return this.checked;
|
||||
|
Reference in New Issue
Block a user