export const arrayFromStringList = (str: string) => { if (!str) return []; return str.split(","); }; export const getOptionLabel = ( name: string, options: any[], selectedFilters: string[], ) => { let title = `${name}`; const selectedLabels: any[] = options.filter((option: any) => selectedFilters.includes(option.filterGuid), ); if (selectedLabels.length > 0) { title = `${name} ${selectedLabels .map((label) => label.name) .join(", ")}`; } return title; };