diff --git a/src/renderer/Grid/DatePickerInline.tsx b/src/renderer/Grid/DatePickerInline.tsx index e9930eb5..25bc29be 100644 --- a/src/renderer/Grid/DatePickerInline.tsx +++ b/src/renderer/Grid/DatePickerInline.tsx @@ -66,7 +66,7 @@ const DatePickerInline: React.FC = ({ ), projects: (value, type) => ( - ), rec: (value, type) => ( - ), pm: (value, type) => ( - diff --git a/src/renderer/Shared.tsx b/src/renderer/Shared.tsx index e8b86b06..b3f3ad44 100644 --- a/src/renderer/Shared.tsx +++ b/src/renderer/Shared.tsx @@ -16,16 +16,18 @@ export const handleFilterSelect = (key: string, name: string, values: string | s const updatedFilters: Filters = { ...filters }; const filterList: Filter[] = updatedFilters[key] || []; + const normalizedValues = typeof values === 'string' ? [values] : values; + const filterIndex = filterList.findIndex((filter: Filter) => { - return Array.isArray(values) && Array.isArray(filter.values) ? - values.every(v => filter.values.includes(v)) : - filter.values === values; + return Array.isArray(normalizedValues) && Array.isArray(filter.values) ? + normalizedValues.every(v => filter.values.includes(v)) : + filter.values === normalizedValues; }); if (filterIndex !== -1) { filterList.splice(filterIndex, 1); } else { - filterList.push({ name, values, exclude }); + filterList.push({ name, values: normalizedValues, exclude }); } updatedFilters[key] = filterList; @@ -35,6 +37,7 @@ export const handleFilterSelect = (key: string, name: string, values: string | s } }; + export const handleLinkClick = (event: MouseEvent, url: string) => { event.preventDefault(); event.stopPropagation();