mirror of
https://github.com/rio-labs/rio.git
synced 2026-05-04 09:59:16 -05:00
fix dropdown not displaying selected option
This commit is contained in:
@@ -279,12 +279,14 @@ export class DropdownComponent extends ComponentBase {
|
||||
// No longer focus the input box
|
||||
this.inputBox.unfocus();
|
||||
|
||||
// If the chosen text hasn't changed there is nothing more to be done
|
||||
// If the chosen text hasn't changed, we only need to reset the text in
|
||||
// the text box
|
||||
if (newOptionName === this.state.selectedName) {
|
||||
this.inputBox.value = newOptionName;
|
||||
return;
|
||||
}
|
||||
|
||||
// If the given option is valid, tell the almighty snake
|
||||
// If the given option is valid, tell python about the new value
|
||||
if (this.state.optionNames.includes(newOptionName)) {
|
||||
this.inputBox.value = newOptionName;
|
||||
this.state.selectedName = newOptionName;
|
||||
|
||||
Reference in New Issue
Block a user