mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-12 23:24:35 +01:00
fix text input
This commit is contained in:
@@ -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 || '' }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user