mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-01-31 11:51:41 +03:00
fix(devui): fix Select widget in Form (#722)
This commit is contained in:
parent
bb72311e1c
commit
a8d99ee424
|
@ -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 = (({
|
||||
|
|
Loading…
Reference in New Issue
Block a user