mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-16 00:54:40 +01:00
dir options setting and default vlaue
This commit is contained in:
@@ -28,6 +28,12 @@ export default class DirInput extends React.Component<IProps, IState> {
|
||||
this.handleIconClick = this.handleIconClick.bind(this)
|
||||
}
|
||||
|
||||
static getDerivedStateFromProps(props: IProps, state: IState) {
|
||||
if (!props.value || state.value !== '') return state
|
||||
|
||||
return { value: props.value || '' }
|
||||
}
|
||||
|
||||
async componentDidMount() {
|
||||
const translation = await translate('components.select_file')
|
||||
this.setState( {
|
||||
|
||||
Reference in New Issue
Block a user