was called before the value of values was updated.
Solution: moved it to useEffect with the dependency of values.
Furthermore, the dropdown settings weren't rendered correctly as the Select Component expects one of the options as its value (like { label: 'string', value: 'string' }) and not just a string. So when a string option is used, find the corresponding option.
Fixes #626
The main problem was that
was called before the value of
values
was updated. Solution: moved it to useEffect with the dependency ofvalues
.Furthermore, the dropdown settings weren't rendered correctly as the
Select
Component expects one of theoptions
as its value (like{ label: 'string', value: 'string' }
) and not just a string. So when a string option is used, find the corresponding option.