Merge branch 'master' into inspector-fix-z-index

This commit is contained in:
Nathan Bierema 2021-06-06 17:41:02 -04:00 committed by GitHub
commit 7edce437fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,8 +4,17 @@ import Select from '../Select';
import Slider from '../Slider';
/* eslint-disable react/prop-types */
const SelectWidget: Widget = ({ options, ...rest }) => (
<Select options={options.enumOptions} {...rest} />
const SelectWidget: Widget = ({ options, onChange, value, ...rest }) => (
<Select
options={options.enumOptions}
onChange={(option: { value: string }) => {
onChange(option.value);
}}
value={(options.enumOptions as { value: string }[]).find(
(option) => option.value === value
)}
{...rest}
/>
);
const RangeWidget: Widget = (({