This commit is contained in:
seb
2026-10-10 22:44:11 +02:00
parent d32e790540
commit 9d578d37f8
2 changed files with 5 additions and 33 deletions

View File

@@ -34,7 +34,6 @@ class ArtikelMarkeNew extends PureComponent {
<Box ref={rowRef} sx={{ display: 'flex', alignItems: 'center', gap: 1, mt: 2, pb: 2 }}> <Box ref={rowRef} sx={{ display: 'flex', alignItems: 'center', gap: 1, mt: 2, pb: 2 }}>
<SingleLineTextEdit <SingleLineTextEdit
size="small" size="small"
label="Neue Marke"
value={newName} value={newName}
onChange={(next) => this.setState({ newName: next })} onChange={(next) => this.setState({ newName: next })}
onKeyDown={(event) => { onKeyDown={(event) => {

View File

@@ -7,6 +7,7 @@ import BackendError from '../../components/BackendError';
import SearchIcon from '@mui/icons-material/Search'; import SearchIcon from '@mui/icons-material/Search';
import IconButton from '@mui/material/IconButton'; import IconButton from '@mui/material/IconButton';
import ClearIcon from '@mui/icons-material/Clear'; import ClearIcon from '@mui/icons-material/Clear';
import SingleLineTextEdit from 'dashgui/SingleLineTextEdit';
import FillSpace from 'dashgui/FillSpace'; import FillSpace from 'dashgui/FillSpace';
import { PanelTile, PanelTileGrid } from 'dashgui/panels'; import { PanelTile, PanelTileGrid } from 'dashgui/panels';
import { backendErrorFrom } from '../../utils/backendError'; import { backendErrorFrom } from '../../utils/backendError';
@@ -39,7 +40,7 @@ class ArtikelMarkenSearchField extends PureComponent {
const { inputRef } = this.props; const { inputRef } = this.props;
return ( return (
<PanelTileGrid sx={{ mb: 2 }}> <PanelTileGrid>
<Box <Box
ref={inputRef} ref={inputRef}
sx={{ sx={{
@@ -50,41 +51,13 @@ class ArtikelMarkenSearchField extends PureComponent {
}, },
display: 'flex', display: 'flex',
flexDirection: 'column', flexDirection: 'column',
gap: 1.5,
}} }}
> >
<TextField <SingleLineTextEdit
sx={{ width: '100%' }} 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" size="small"
onClick={() => this.clearInput()} value={this.state.input}
onMouseDown={(e) => e.preventDefault()} onChange={(next) => this.onInputChange(next)}
aria-label="Suche löschen"
>
<ClearIcon fontSize="small" />
</IconButton>
</InputAdornment>
),
},
}}
/> />
<ArtikelMarkeNew /> <ArtikelMarkeNew />
</Box> </Box>