diff options
author | Matjaž Črnko <m.crnko@txt.si> | 2024-01-22 15:12:47 +0100 |
---|---|---|
committer | Matjaž Črnko <m.crnko@txt.si> | 2024-01-22 15:12:47 +0100 |
commit | fd58e2bb16e41a6097135b77565a4f6e39f61d85 (patch) | |
tree | 931e88ce8b263c27719cb5297768391962a3353d /modern | |
parent | b39ffd97e355dc2a6bba65ffa56947734455ed24 (diff) | |
download | trackermap-web-fd58e2bb16e41a6097135b77565a4f6e39f61d85.tar.gz trackermap-web-fd58e2bb16e41a6097135b77565a4f6e39f61d85.tar.bz2 trackermap-web-fd58e2bb16e41a6097135b77565a4f6e39f61d85.zip |
fix: Migrate more Select to SelectField
Diffstat (limited to 'modern')
-rw-r--r-- | modern/src/reports/components/ReportFilter.jsx | 23 |
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')} |