Skip to content

Commit

Permalink
feat(debris): allow costume filter
Browse files Browse the repository at this point in the history
  • Loading branch information
KeziahMoselle committed Jan 23, 2023
1 parent b7b7466 commit c0a95ea
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/pages/database/debris.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ export default function DebrisPage({ debris }: DebrisPageProps): JSX.Element {
field: "costume",
title: "Costume",
render: (thought) => {
console.log(thought);
return (
<div className="flex items-center gap-x-4 w-80">
{thought.costume.map((costume) => (
Expand Down Expand Up @@ -128,6 +127,14 @@ export default function DebrisPage({ debris }: DebrisPageProps): JSX.Element {
</div>
);
},
customFilterAndSearch: (term, thought) => {
if (term.length === 0) return true;
return thought.costume.some((costume) =>
`${costume.character.name.toLowerCase()} ${costume.title.toLowerCase()}`.includes(
term.toLowerCase()
)
);
},
},
{
field: "rarity",
Expand Down

0 comments on commit c0a95ea

Please sign in to comment.