Skip to content

Commit

Permalink
#OBS-I304: added optional chainig
Browse files Browse the repository at this point in the history
  • Loading branch information
Rakshitha-D committed Nov 12, 2024
1 parent 32716ba commit 30d718c
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ const GranularityOptions = ({ selectedOptions, setSelectedOptions, setSelectedGr
<Grid item style={{ display: 'flex', flexDirection: 'row', gap: 10 }}>
{granularityOptions.map((option: any) => {
if (option.checkbox === true) {
return <Grid style={{ display: 'flex', alignItems: 'center' }} key={option.value}>
return <Grid style={{ display: 'flex', alignItems: 'center' }} key={option?.value}>
<Checkbox
checked={location.state?.edit ? true : selectedOptions.includes(option.value) || existingGranularity.includes(option.value)}
onChange={() => handleCheckboxChange(option.value)}
disabled={location.state?.edit ? true : existingGranularity.includes(option.value)}
checked={location.state?.edit ? true : selectedOptions.includes(option?.value) || existingGranularity.includes(option?.value)}
onChange={() => handleCheckboxChange(option?.value)}
disabled={location.state?.edit ? true : existingGranularity.includes(option?.value)}
/>
<Typography variant='body1'>{_.capitalize(option.label)}</Typography>
<Typography variant='body1'>{_.capitalize(option?.label)}</Typography>
</Grid>
}
})}
Expand Down

0 comments on commit 30d718c

Please sign in to comment.