Fix value check. Reset through form caused unexpected value.
This commit is contained in:
parent
6426802d18
commit
d58c280433
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@tp/tp-checkbox",
|
||||
"version": "1.0.6",
|
||||
"version": "1.0.7",
|
||||
"description": "",
|
||||
"main": "tp-checkbox.js",
|
||||
"scripts": {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user