fix text input

This commit is contained in:
SpikeHD
2022-05-10 01:28:56 -07:00
parent 2a283cfc8b
commit df22ced120

View File

@@ -22,6 +22,12 @@ export default class TextInput extends React.Component<IProps, IState> {
}
static getDerivedStateFromProps(props: IProps, state: IState) {
if (!props.readOnly) {
return {
value: state.value
}
}
return { value: props.value || '' }
}