Skip to content

Commit

Permalink
ADM-691: [frontend] fix: fix sonar
Browse files Browse the repository at this point in the history
  • Loading branch information
neomgb committed Mar 12, 2024
1 parent 33f45ea commit 8943d74
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,22 @@ export const SingleSelection = ({ options, label, value, onValueChange }: Props)
const labelId = `rework-single-selection-${label.toLowerCase().replace(/\s/g, '-')}`;

return (
<>
<FormControlWrapper variant='standard' required>
<Autocomplete
disableClearable
data-testid={labelId}
options={options}
value={value as string | undefined}
onChange={(event, newValue: string) => onValueChange(newValue)}
renderInput={(params) => <TextField required {...params} label={label} variant='standard' />}
slotProps={{
popper: {
sx: {
zIndex: Z_INDEX.DROPDOWN,
},
<FormControlWrapper variant='standard' required>
<Autocomplete
disableClearable
data-testid={labelId}
options={options}
value={value as string | undefined}
onChange={(event, newValue: string) => onValueChange(newValue)}
renderInput={(params) => <TextField required {...params} label={label} variant='standard' />}
slotProps={{
popper: {
sx: {
zIndex: Z_INDEX.DROPDOWN,
},
}}
/>
</FormControlWrapper>
</>
},
}}
/>
</FormControlWrapper>
);
};
3 changes: 1 addition & 2 deletions frontend/src/containers/MetricsStep/ReworkSettings/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { selectReworkTimesSettings, updateReworkTimesSettings } from '@src/context/Metrics/metricsSlice';
import { MetricsSettingTitle } from '@src/components/Common/MetricsSettingTitle';
import { ReworkHeaderWrapper, ReworkSettingsWrapper, StyledLink } from './style';
import HelpOutlineOutlinedIcon from '@mui/icons-material/HelpOutlineOutlined';
import { selectReworkTimesSettings } from '@src/context/Metrics/metricsSlice';
import { updateReworkTimesSettings } from '@src/context/Metrics/metricsSlice';
import MultiAutoComplete from '@src/components/Common/MultiAutoComplete';
import { useAppDispatch, useAppSelector } from '@src/hooks';
import { CYCLE_TIME_LIST } from '@src/constants/resources';
Expand Down

0 comments on commit 8943d74

Please sign in to comment.