This commit is contained in:
seb
2026-10-10 22:29:06 +02:00
parent 0dbc7e2f65
commit d5aca2b183

View File

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