u
This commit is contained in:
@@ -22,6 +22,18 @@ import {
|
|||||||
} from '../../colors';
|
} from '../../colors';
|
||||||
|
|
||||||
class ArtikelMarkenSearchField extends PureComponent {
|
class ArtikelMarkenSearchField extends PureComponent {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = { input: '' };
|
||||||
|
}
|
||||||
|
|
||||||
|
onInputChange(input) {
|
||||||
|
this.setState({ input });
|
||||||
|
}
|
||||||
|
|
||||||
|
clearInput() {
|
||||||
|
this.setState({ input: '' });
|
||||||
|
}
|
||||||
render() {
|
render() {
|
||||||
const { inputRef } = this.props;
|
const { inputRef } = this.props;
|
||||||
|
|
||||||
@@ -40,8 +52,8 @@ class ArtikelMarkenSearchField extends PureComponent {
|
|||||||
sx={{ maxWidth: 520, flexGrow: 1 }}
|
sx={{ maxWidth: 520, flexGrow: 1 }}
|
||||||
autoFocus
|
autoFocus
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
value={''}
|
value={this.state.input}
|
||||||
onChange={() => { }}
|
onChange={(e) => this.onInputChange(e.target.value)}
|
||||||
slotProps={{
|
slotProps={{
|
||||||
htmlInput: {
|
htmlInput: {
|
||||||
autoCapitalize: 'off',
|
autoCapitalize: 'off',
|
||||||
@@ -58,7 +70,7 @@ class ArtikelMarkenSearchField extends PureComponent {
|
|||||||
<InputAdornment position="end">
|
<InputAdornment position="end">
|
||||||
<IconButton
|
<IconButton
|
||||||
size="small"
|
size="small"
|
||||||
onClick={() => { }}
|
onClick={() => this.clearInput()}
|
||||||
onMouseDown={(e) => e.preventDefault()}
|
onMouseDown={(e) => e.preventDefault()}
|
||||||
aria-label="Suche löschen"
|
aria-label="Suche löschen"
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user