feat(donations): Donation table filtering
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
import DonationStatus from "./DonationStatus.svelte";
|
||||
import DonationTableAction from "./DonationTableAction.svelte";
|
||||
import DeleteDonationModal from "./DeleteDonationModal.svelte";
|
||||
import { donationDonorFilter, donationRunnerFilter } from "../shared/tablefilters";
|
||||
$: searchvalue = "";
|
||||
$: active_deletes = [];
|
||||
$: active_edits = [];
|
||||
@@ -54,7 +55,7 @@
|
||||
cell: (info) => {
|
||||
return renderComponent(DonationDonor, { donor: info.getValue() });
|
||||
},
|
||||
filterFn: `includesString`,
|
||||
filterFn: `donor`,
|
||||
},
|
||||
{
|
||||
accessorKey: "runner",
|
||||
@@ -62,7 +63,7 @@
|
||||
cell: (info) => {
|
||||
return renderComponent(DonationRunner, { runner: info.getValue() });
|
||||
},
|
||||
filterFn: `includesString`,
|
||||
filterFn: `runner`,
|
||||
},
|
||||
{
|
||||
accessorKey: "amountPerDistance",
|
||||
@@ -139,6 +140,10 @@
|
||||
pageSize: 50,
|
||||
},
|
||||
},
|
||||
filterFns: {
|
||||
donor: donationDonorFilter,
|
||||
runner: donationRunnerFilter,
|
||||
},
|
||||
enableRowSelection: true,
|
||||
getCoreRowModel: getCoreRowModel(),
|
||||
getFilteredRowModel: getFilteredRowModel(),
|
||||
|
||||
Reference in New Issue
Block a user