import { Chip, Tooltip } from '@mui/material'; export const ORG_UNIT_TAGS_LIMIT = 2; export const renderOrgUnitValue = (value, getItemProps) => { const visible = value.slice(0, ORG_UNIT_TAGS_LIMIT); const hidden = value.slice(ORG_UNIT_TAGS_LIMIT); const tags = visible.map((option, index) => { const { key, ...itemProps } = getItemProps({ index }); return ( ); }); if (hidden.length > 0) { tags.push( option.title).join(', ')} arrow > , ); } return tags; };