aboutsummaryrefslogtreecommitdiff
path: root/modern/src/reports/components
diff options
context:
space:
mode:
authorMatjaž Črnko <m.crnko@txt.si>2024-01-22 21:06:27 +0100
committerMatjaž Črnko <m.crnko@txt.si>2024-01-22 21:06:27 +0100
commitba24d834925f3d66d875ae601e80a60cf03110cc (patch)
tree54b665435cd2bff9d21d730f7f7c18dbe509da3b /modern/src/reports/components
parent829fa6caac936cc53395ca4fe7f05e13c2841588 (diff)
downloadtrackermap-web-ba24d834925f3d66d875ae601e80a60cf03110cc.tar.gz
trackermap-web-ba24d834925f3d66d875ae601e80a60cf03110cc.tar.bz2
trackermap-web-ba24d834925f3d66d875ae601e80a60cf03110cc.zip
fix: SelectField default to null value and fix emptyTitle
Diffstat (limited to 'modern/src/reports/components')
-rw-r--r--modern/src/reports/components/ReportFilter.jsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/modern/src/reports/components/ReportFilter.jsx b/modern/src/reports/components/ReportFilter.jsx
index f7b4a6e1..5b4c5786 100644
--- a/modern/src/reports/components/ReportFilter.jsx
+++ b/modern/src/reports/components/ReportFilter.jsx
@@ -95,7 +95,7 @@ const ReportFilter = ({ children, handleSubmit, handleSchedule, showOnly, ignore
<SelectField
label={t(multiDevice ? 'deviceTitle' : 'reportDevice')}
data={Object.values(devices).sort((a, b) => a.name.localeCompare(b.name))}
- value={multiDevice ? deviceIds : deviceId || null}
+ value={multiDevice ? deviceIds : deviceId}
onChange={(e) => dispatch(multiDevice ? devicesActions.selectIds(e.target.value) : devicesActions.selectId(e.target.value))}
multiple={multiDevice}
fullWidth
@@ -165,7 +165,7 @@ const ReportFilter = ({ children, handleSubmit, handleSchedule, showOnly, ignore
</div>
<div className={classes.filterItem}>
<SelectField
- value={calendarId || null}
+ value={calendarId}
onChange={(event) => setCalendarId(Number(event.target.value))}
endpoint="/api/calendars"
label={t('sharedCalendar')}