All Downloads are FREE. Search and download functionalities are using the official Maven repository.

components.process.bar.GroupByField.js Maven / Gradle / Ivy

There is a newer version: 0.80.3
Show newest version
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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy