Skip to content

Commit ddf94e2

Browse files
authored
Merge pull request #88 from BEXIS2/table
Add check for custom filtering function for Date objects
2 parents b6b3653 + 28098bf commit ddf94e2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib/components/Table/TableFilter.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@
3030
type = typeof (toFilterableValueFn ? toFilterableValueFn(item) : item);
3131
3232
if (type === 'object') {
33-
if (item instanceof Date) {
33+
if (toFilterableValueFn && toFilterableValueFn(item) instanceof Date) {
34+
isDate = true;
35+
} else if (item instanceof Date) {
3436
isDate = true;
3537
}
3638
}

0 commit comments

Comments
 (0)