Skip to content

Commit 28098bf

Browse files
committed
Add check for custom date filterable fn
1 parent 5acc46b commit 28098bf

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)