aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatjaž Črnko <m.crnko@txt.si>2024-01-22 15:12:47 +0100
committerMatjaž Črnko <m.crnko@txt.si>2024-01-22 15:12:47 +0100
commitfd58e2bb16e41a6097135b77565a4f6e39f61d85 (patch)
tree931e88ce8b263c27719cb5297768391962a3353d
parentb39ffd97e355dc2a6bba65ffa56947734455ed24 (diff)
downloadtrackermap-web-fd58e2bb16e41a6097135b77565a4f6e39f61d85.tar.gz
trackermap-web-fd58e2bb16e41a6097135b77565a4f6e39f61d85.tar.bz2
trackermap-web-fd58e2bb16e41a6097135b77565a4f6e39f61d85.zip
fix: Migrate more Select to SelectField
-rw-r--r--modern/src/reports/components/ReportFilter.jsx23
1 files changed, 9 insertions, 14 deletions
diff --git a/modern/src/reports/components/ReportFilter.jsx b/modern/src/reports/components/ReportFilter.jsx
index 9e6a0a23..f7b4a6e1 100644
--- a/modern/src/reports/components/ReportFilter.jsx
+++ b/modern/src/reports/components/ReportFilter.jsx
@@ -104,19 +104,14 @@ const ReportFilter = ({ children, handleSubmit, handleSchedule, showOnly, ignore
)}
{includeGroups && (
<div className={classes.filterItem}>
- <FormControl fullWidth>
- <InputLabel>{t('settingsGroups')}</InputLabel>
- <Select
- label={t('settingsGroups')}
- value={groupIds}
- onChange={(e) => dispatch(reportsActions.updateGroupIds(e.target.value))}
- multiple
- >
- {Object.values(groups).sort((a, b) => a.name.localeCompare(b.name)).map((group) => (
- <MenuItem key={group.id} value={group.id}>{group.name}</MenuItem>
- ))}
- </Select>
- </FormControl>
+ <SelectField
+ label={t('settingsGroups')}
+ data={Object.values(groups).sort((a, b) => a.name.localeCompare(b.name))}
+ value={groupIds}
+ onChange={(e) => dispatch(reportsActions.updateGroupIds(e.target.value))}
+ multiple
+ fullWidth
+ />
</div>
)}
{button !== 'schedule' ? (
@@ -170,7 +165,7 @@ const ReportFilter = ({ children, handleSubmit, handleSchedule, showOnly, ignore
</div>
<div className={classes.filterItem}>
<SelectField
- value={calendarId || 0}
+ value={calendarId || null}
onChange={(event) => setCalendarId(Number(event.target.value))}
endpoint="/api/calendars"
label={t('sharedCalendar')}