ui fixes for filtering
This commit is contained in:
@@ -109,31 +109,41 @@ export default function Dashboard() {
|
|||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: { xs: "column", sm: "row" },
|
flexDirection: { xs: "column", sm: "row" },
|
||||||
gap: 2,
|
gap: 2,
|
||||||
alignItems: { xs: "stretch", sm: "center" },
|
alignItems: { xs: "stretch", sm: "flex-end" },
|
||||||
borderRadius: 4,
|
borderRadius: 4,
|
||||||
mb: -2 // pull up to be closer to the dashboard container below
|
mb: -2 // pull up to be closer to the dashboard container below
|
||||||
}}
|
}}
|
||||||
elevation={0}
|
elevation={0}
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
>
|
>
|
||||||
<Autocomplete
|
<Box sx={{ display: 'flex', flexDirection: 'column', flex: 1, minWidth: { sm: 250 } }}>
|
||||||
multiple
|
<Box sx={{ typography: 'caption', mb: 1, color: 'text.secondary' }}>
|
||||||
freeSolo
|
Filter by Payee
|
||||||
options={loadedPayees}
|
</Box>
|
||||||
value={payeeInput}
|
<Autocomplete
|
||||||
onChange={(_, val) => setPayeeInput(val as string[])}
|
multiple
|
||||||
renderInput={(params) => <TextField {...params} label="Filter by Payee" />}
|
freeSolo
|
||||||
sx={{ minWidth: { sm: 250 }, flex: 1 }}
|
options={loadedPayees}
|
||||||
/>
|
value={payeeInput}
|
||||||
<Autocomplete
|
onChange={(_, val) => setPayeeInput(val as string[])}
|
||||||
multiple
|
renderInput={(params) => <TextField {...params} placeholder="Add payees..." />}
|
||||||
freeSolo
|
sx={{ '& .MuiOutlinedInput-root': { height: 'auto', minHeight: '2.5rem', py: 0.5 } }}
|
||||||
options={loadedTags}
|
/>
|
||||||
value={tagsInput}
|
</Box>
|
||||||
onChange={(_, val) => setTagsInput(val as string[])}
|
<Box sx={{ display: 'flex', flexDirection: 'column', flex: 1, minWidth: { sm: 250 } }}>
|
||||||
renderInput={(params) => <TextField {...params} label="Filter by Tags" />}
|
<Box sx={{ typography: 'caption', mb: 1, color: 'text.secondary' }}>
|
||||||
sx={{ minWidth: { sm: 250 }, flex: 1 }}
|
Filter by Tags
|
||||||
/>
|
</Box>
|
||||||
|
<Autocomplete
|
||||||
|
multiple
|
||||||
|
freeSolo
|
||||||
|
options={loadedTags}
|
||||||
|
value={tagsInput}
|
||||||
|
onChange={(_, val) => setTagsInput(val as string[])}
|
||||||
|
renderInput={(params) => <TextField {...params} placeholder="Add tags..." />}
|
||||||
|
sx={{ '& .MuiOutlinedInput-root': { height: 'auto', minHeight: '2.5rem', py: 0.5 } }}
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
size="large"
|
size="large"
|
||||||
@@ -142,7 +152,7 @@ export default function Dashboard() {
|
|||||||
setAppliedTags(tagsInput);
|
setAppliedTags(tagsInput);
|
||||||
}}
|
}}
|
||||||
disabled={isLoading}
|
disabled={isLoading}
|
||||||
sx={{ height: 56, borderRadius: 2 }}
|
sx={{ height: 40, borderRadius: 2 }} // Changed from 56 to 40 to match minHeight of inputs
|
||||||
>
|
>
|
||||||
Apply
|
Apply
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Reference in New Issue
Block a user