Skip to content

Commit d389916

Browse files
committed
fix: fixing selection in boolean selector
1 parent 27c4fbc commit d389916

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

api-property-form-item.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ class ApiPropertyFormItem extends ValidatableMixin(LitElement) {
135135

136136
_booleanTemplate() {
137137
const { model, name, readOnly, disabled, value, outlined, legacy } = this;
138+
const bindValue = (value === true || value === 'true') ? 'true' : 'false';
138139
return html`
139140
<anypoint-dropdown-menu
140141
name="${name}"
@@ -148,7 +149,7 @@ class ApiPropertyFormItem extends ValidatableMixin(LitElement) {
148149
<anypoint-listbox
149150
slot="dropdown-content"
150151
attrforselected="data-value"
151-
.selected="${value}"
152+
.selected="${bindValue}"
152153
?legacy="${legacy}"
153154
@selected-changed="${this._listSelectionHandler}">
154155
<anypoint-item data-value="true">True</anypoint-item>

0 commit comments

Comments
 (0)