(value)
| 158 | } |
| 159 | |
| 160 | setValue(value) { |
| 161 | if (this.nullable && !value) { |
| 162 | this.editor.selectItemAt(0); |
| 163 | return; |
| 164 | } |
| 165 | const selected = this.selections.find(s => s.value == value)?.name; |
| 166 | if (selected) |
| 167 | this.#setSelected(selected); |
| 168 | } |
| 169 | |
| 170 | #setSelected(name: string) { |
| 171 | const index = this.editor.getItems().indexOf(name); |