feat: bool dispatcher
This commit is contained in:
parent
370e04e005
commit
8a36a0594a
|
@ -4,11 +4,12 @@ import React from 'react';
|
||||||
import propTypes from './prop-types';
|
import propTypes from './prop-types';
|
||||||
|
|
||||||
const Bool = ({
|
const Bool = ({
|
||||||
|
dispatchers: {onChange = () => {}},
|
||||||
value,
|
value,
|
||||||
}) => (
|
}) => (
|
||||||
<select readOnly value={value}>
|
<select onChange={(event) => onChange(!!event.target.value)} value={value ? '1' : ''}>
|
||||||
<option>false</option>
|
<option value="">false</option>
|
||||||
<option>true</option>
|
<option value="1">true</option>
|
||||||
</select>
|
</select>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user