export function toStringArray(value?: string | string[]) { return Array.isArray(value) ? value : value ? [value] : []; } export function isItemSelected( rootValue: string | string[] | undefined, value: string ) { return Array.isArray(rootValue) ? rootValue.includes(value) : rootValue === value; }