u
This commit is contained in:
@@ -34,54 +34,61 @@ class ArtikelMarkenSearchField extends PureComponent {
|
|||||||
clearInput() {
|
clearInput() {
|
||||||
this.setState({ input: '' });
|
this.setState({ input: '' });
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { inputRef } = this.props;
|
const { inputRef } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box
|
<PanelTileGrid sx={{ mb: 2 }}>
|
||||||
ref={inputRef}
|
<Box
|
||||||
sx={{
|
ref={inputRef}
|
||||||
mb: 2,
|
sx={{
|
||||||
display: 'flex',
|
gridColumn: {
|
||||||
gap: 1.5,
|
xs: '1 / -1',
|
||||||
alignItems: 'center',
|
sm: 'span 2',
|
||||||
minHeight: 40,
|
md: 'span 2',
|
||||||
}}
|
|
||||||
>
|
|
||||||
<TextField
|
|
||||||
sx={{ maxWidth: 520, flexGrow: 1 }}
|
|
||||||
autoFocus
|
|
||||||
autoComplete="off"
|
|
||||||
value={this.state.input}
|
|
||||||
onChange={(e) => this.onInputChange(e.target.value)}
|
|
||||||
slotProps={{
|
|
||||||
htmlInput: {
|
|
||||||
autoCapitalize: 'off',
|
|
||||||
autoCorrect: 'off',
|
|
||||||
},
|
|
||||||
input: {
|
|
||||||
sx: { height: 40 },
|
|
||||||
startAdornment: (
|
|
||||||
<InputAdornment position="start">
|
|
||||||
<SearchIcon color="action" />
|
|
||||||
</InputAdornment>
|
|
||||||
),
|
|
||||||
endAdornment: (
|
|
||||||
<InputAdornment position="end">
|
|
||||||
<IconButton
|
|
||||||
size="small"
|
|
||||||
onClick={() => this.clearInput()}
|
|
||||||
onMouseDown={(e) => e.preventDefault()}
|
|
||||||
aria-label="Suche löschen"
|
|
||||||
>
|
|
||||||
<ClearIcon fontSize="small" />
|
|
||||||
</IconButton>
|
|
||||||
</InputAdornment>
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'column',
|
||||||
|
gap: 1.5,
|
||||||
}}
|
}}
|
||||||
/>
|
>
|
||||||
</Box>
|
<TextField
|
||||||
|
sx={{ width: '100%' }}
|
||||||
|
autoFocus
|
||||||
|
autoComplete="off"
|
||||||
|
value={this.state.input}
|
||||||
|
onChange={(e) => this.onInputChange(e.target.value)}
|
||||||
|
slotProps={{
|
||||||
|
htmlInput: {
|
||||||
|
autoCapitalize: 'off',
|
||||||
|
autoCorrect: 'off',
|
||||||
|
},
|
||||||
|
input: {
|
||||||
|
sx: { height: 40 },
|
||||||
|
startAdornment: (
|
||||||
|
<InputAdornment position="start">
|
||||||
|
<SearchIcon color="action" />
|
||||||
|
</InputAdornment>
|
||||||
|
),
|
||||||
|
endAdornment: (
|
||||||
|
<InputAdornment position="end">
|
||||||
|
<IconButton
|
||||||
|
size="small"
|
||||||
|
onClick={() => this.clearInput()}
|
||||||
|
onMouseDown={(e) => e.preventDefault()}
|
||||||
|
aria-label="Suche löschen"
|
||||||
|
>
|
||||||
|
<ClearIcon fontSize="small" />
|
||||||
|
</IconButton>
|
||||||
|
</InputAdornment>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<ArtikelMarkeNew />
|
||||||
|
</Box>
|
||||||
|
</PanelTileGrid>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -95,7 +102,6 @@ class ArtikelMarkenPage extends PureComponent {
|
|||||||
brands: brandAutomat.state.brands,
|
brands: brandAutomat.state.brands,
|
||||||
};
|
};
|
||||||
this.searchRef = createRef();
|
this.searchRef = createRef();
|
||||||
this.createRowRef = createRef();
|
|
||||||
this.handleRetry = this.handleRetry.bind(this);
|
this.handleRetry = this.handleRetry.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -140,15 +146,12 @@ class ArtikelMarkenPage extends PureComponent {
|
|||||||
<PanelTile wide={2} minHeight={0} color={PURPLE_PANEL} sx={{ pb: 0 }}>
|
<PanelTile wide={2} minHeight={0} color={PURPLE_PANEL} sx={{ pb: 0 }}>
|
||||||
<FillSpace
|
<FillSpace
|
||||||
aboveRef={[this.searchRef]}
|
aboveRef={[this.searchRef]}
|
||||||
belowRef={this.createRowRef}
|
|
||||||
reserveBottom={32}
|
reserveBottom={32}
|
||||||
minPageSize={8}
|
minPageSize={8}
|
||||||
minHeight={0}
|
minHeight={0}
|
||||||
items={brands}
|
items={brands}
|
||||||
renderItem={ArtikelMarke}
|
renderItem={ArtikelMarke}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<ArtikelMarkeNew rowRef={this.createRowRef} />
|
|
||||||
</PanelTile>
|
</PanelTile>
|
||||||
</PanelTileGrid>
|
</PanelTileGrid>
|
||||||
</>
|
</>
|
||||||
|
|||||||
Reference in New Issue
Block a user