diff options
Diffstat (limited to 'client/js/app/src/app/pages/querybuilder/Components/Text/SimpleDropDownForm.jsx')
-rw-r--r-- | client/js/app/src/app/pages/querybuilder/Components/Text/SimpleDropDownForm.jsx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/client/js/app/src/app/pages/querybuilder/Components/Text/SimpleDropDownForm.jsx b/client/js/app/src/app/pages/querybuilder/Components/Text/SimpleDropDownForm.jsx index 01288cea44f..94c6c01b619 100644 --- a/client/js/app/src/app/pages/querybuilder/Components/Text/SimpleDropDownForm.jsx +++ b/client/js/app/src/app/pages/querybuilder/Components/Text/SimpleDropDownForm.jsx @@ -7,10 +7,11 @@ export default function SimpleDropDownForm({ className = 'input', onChange, value, + initial, }) { const { selectedItems } = useContext(QueryInputContext); - //FIXME: using the filtered list to render options results in dropdown not changing the displayed selection to what was actually selected. + //TODO: using the filtered list to render options results in dropdown not changing the displayed selection to what was actually selected. let filtered = Object.keys(choices).filter( (choice) => !selectedItems.includes(choice) ); @@ -30,7 +31,12 @@ export default function SimpleDropDownForm({ return ( <form id={id}> - <select className={className} id={id} value={value} onChange={onChange}> + <select + className={className} + id={id} + defaultValue={initial} + onChange={onChange} + > {options} </select> </form> |