Skip to content

Commit aeb4bb0

Browse files
committed
Fix selecting numeric values in dropdowns
1 parent d8f7c32 commit aeb4bb0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

js_src/components/DropdownComponent.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ export class DropdownComponent extends BaseComponent {
3535

3636
const availableChoices = this.#getAvailableChoices();
3737

38-
for (const optionLabel of availableChoices) {
38+
for (let optionLabel of availableChoices) {
3939
const option = document.createElement('option');
40+
optionLabel = String(optionLabel);
4041
option.value = optionLabel;
4142
option.innerText = optionLabel;
4243
option.selected = select.multiple ? (this.myState.value && this.myState.value.has(optionLabel)) : (this.myState.value && this.myState.value === optionLabel);

0 commit comments

Comments
 (0)