From 3229441f4b254eb13266486ff5b29e3dd952357b Mon Sep 17 00:00:00 2001 From: Matjaž Črnko Date: Fri, 8 Mar 2024 11:10:49 +0100 Subject: fix: Linting. --- modern/src/common/components/SelectField.jsx | 10 +++++----- modern/src/reports/components/ReportFilter.jsx | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modern/src/common/components/SelectField.jsx b/modern/src/common/components/SelectField.jsx index c7efe75f..db8c30b0 100644 --- a/modern/src/common/components/SelectField.jsx +++ b/modern/src/common/components/SelectField.jsx @@ -1,5 +1,5 @@ import { - FormControl, InputLabel, MenuItem, Select, Autocomplete, TextField + FormControl, InputLabel, MenuItem, Select, Autocomplete, TextField, } from '@mui/material'; import React, { useState } from 'react'; import { useEffectAsync } from '../../reactHelper'; @@ -21,10 +21,10 @@ const SelectField = ({ const getOptionLabel = (option) => { if (typeof option !== 'object') { - option = items.find(obj => keyGetter(obj) === option); + option = items.find((obj) => keyGetter(obj) === option); } return option ? titleGetter(option) : emptyTitle; - } + }; useEffectAsync(async () => { if (endpoint) { @@ -62,9 +62,9 @@ const SelectField = ({ renderOption={(props, option) => ( {titleGetter(option)} )} - isOptionEqualToValue={(option, value) => keyGetter(option) == value} + isOptionEqualToValue={(option, value) => keyGetter(option) === value} value={value} - onChange={(_, value) => onChange({ target: { value: value ? keyGetter(value) : emptyValue }})} + onChange={(_, value) => onChange({ target: { value: value ? keyGetter(value) : emptyValue } })} renderInput={(params) => } /> )} diff --git a/modern/src/reports/components/ReportFilter.jsx b/modern/src/reports/components/ReportFilter.jsx index 5b4c5786..e6e08f16 100644 --- a/modern/src/reports/components/ReportFilter.jsx +++ b/modern/src/reports/components/ReportFilter.jsx @@ -1,6 +1,6 @@ import React, { useState } from 'react'; import { - FormControl, InputLabel, Select, MenuItem, Button, TextField, Typography, Autocomplete + FormControl, InputLabel, Select, MenuItem, Button, TextField, Typography, } from '@mui/material'; import { useDispatch, useSelector } from 'react-redux'; import dayjs from 'dayjs'; @@ -92,7 +92,7 @@ const ReportFilter = ({ children, handleSubmit, handleSchedule, showOnly, ignore
{!ignoreDevice && (
- a.name.localeCompare(b.name))} value={multiDevice ? deviceIds : deviceId} @@ -104,13 +104,13 @@ const ReportFilter = ({ children, handleSubmit, handleSchedule, showOnly, ignore )} {includeGroups && (
- a.name.localeCompare(b.name))} value={groupIds} onChange={(e) => dispatch(reportsActions.updateGroupIds(e.target.value))} multiple - fullWidth + fullWidth />
)} -- cgit v1.2.3