refactor: select for bool
This commit is contained in:
parent
0e5b5ec2ae
commit
33be5cb110
|
@ -26,16 +26,19 @@ const Literal = ({
|
|||
const patch = useJsonPatcher();
|
||||
const valueComponent = (path, type, {value}) => {
|
||||
switch (type) {
|
||||
case 'bool':
|
||||
case 'bool': {
|
||||
return (
|
||||
<input
|
||||
type="checkbox"
|
||||
<select
|
||||
onChange={(event) => {
|
||||
onChange(event, event.target.checked, path);
|
||||
onChange(event, event.target.value, path);
|
||||
}}
|
||||
value={null === value ? false : value}
|
||||
/>
|
||||
>
|
||||
<option value={false}>false</option>
|
||||
<option value>true</option>
|
||||
</select>
|
||||
);
|
||||
}
|
||||
case 'expressions':
|
||||
return (
|
||||
<Expressions
|
||||
|
|
Loading…
Reference in New Issue
Block a user