Implemented SwitchTableField
This commit is contained in:
parent
914f8929ed
commit
d1dbcab005
1 changed files with 2 additions and 2 deletions
|
|
@ -17,10 +17,10 @@ interface Props {
|
||||||
}
|
}
|
||||||
|
|
||||||
const SwitchTableField = (props: Props) => {
|
const SwitchTableField = (props: Props) => {
|
||||||
const [value, setValue] = useState(props.value)
|
const [value, setValue] = useState(false)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (value !== props.value) setValue(props.value)
|
if (props.value) setValue(props.value)
|
||||||
}, [props.value])
|
}, [props.value])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue