mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-15 00:24:45 +01:00
server input tweaks
This commit is contained in:
@@ -42,13 +42,16 @@ export default class TextInput extends React.Component<IProps, IState> {
|
||||
this.setState({ value: e.target.value })
|
||||
if (this.props.onChange) this.props.onChange(e.target.value)
|
||||
}} />
|
||||
<div className="TextClear" onClick={() => {
|
||||
this.setState({ value: '' })
|
||||
|
||||
if (this.props.onChange) this.props.onChange('')
|
||||
}}>
|
||||
<img src={Close} className="TextInputClear" />
|
||||
</div>
|
||||
{
|
||||
this.props.clearable ?
|
||||
<div className="TextClear" onClick={() => {
|
||||
this.setState({ value: '' })
|
||||
|
||||
if (this.props.onChange) this.props.onChange('')
|
||||
}}>
|
||||
<img src={Close} className="TextInputClear" />
|
||||
</div> : null
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user