components.process.bar.GroupByField.js Maven / Gradle / Ivy
import {
TextField,
Autocomplete
} from '@mui/material';
import GroupAdornment from 'components/process/bar/GroupAdornment';
import { useTranslation } from 'react-i18next';
const GroupByField = ({value, setValue}) => {
const { t } = useTranslation()
const options = [
{ value: 'none', label: t('grouping.options.none') },
{ value: 'category', label: t('grouping.options.category') },
{ value: 'subcategory', label: t('grouping.options.subcategory') }
]
const selectedOption = options.find(option => option.value === value)
return setValue(option?.value)}
value={selectedOption}
disableClearable
renderInput={(params) =>
,
}}
label={t('grouping.groupBy')}
fullWidth
/>
}
/>
}
export default GroupByField