From b39ffd97e355dc2a6bba65ffa56947734455ed24 Mon Sep 17 00:00:00 2001 From: Matjaž Črnko Date: Mon, 22 Jan 2024 14:55:53 +0100 Subject: fix: Migrate ReportFilter to SelectField --- modern/src/reports/components/ReportFilter.jsx | 43 +++++--------------------- 1 file changed, 8 insertions(+), 35 deletions(-) (limited to 'modern/src/reports/components') diff --git a/modern/src/reports/components/ReportFilter.jsx b/modern/src/reports/components/ReportFilter.jsx index de64188c..9e6a0a23 100644 --- a/modern/src/reports/components/ReportFilter.jsx +++ b/modern/src/reports/components/ReportFilter.jsx @@ -92,41 +92,14 @@ const ReportFilter = ({ children, handleSubmit, handleSchedule, showOnly, ignore
{!ignoreDevice && (
- - {multiDevice ? ( - <> - {t('deviceTitle')} - - - ) : ( - <> - a.name.localeCompare(b.name))} - getOptionLabel={(option) => option?.name ?? ''} - renderOption={(props, option) => ( - - {option.name} - - )} - value={devices[deviceId] || null} - onChange={(event, newValue) => { - dispatch(devicesActions.selectId(newValue?.id ?? null)) - }} - renderInput={(params) => } - /> - - )} - + a.name.localeCompare(b.name))} + value={multiDevice ? deviceIds : deviceId || null} + onChange={(e) => dispatch(multiDevice ? devicesActions.selectIds(e.target.value) : devicesActions.selectId(e.target.value))} + multiple={multiDevice} + fullWidth + />
)} {includeGroups && ( -- cgit v1.2.3