Skip to content

Commit

Permalink
fix: actual team search and member name styling
Browse files Browse the repository at this point in the history
  • Loading branch information
lmaosoggypancakes committed Mar 16, 2024
1 parent 1133486 commit 7386c4f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/components/admin/Teams/index.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@

.buttonMargin {
margin-right: 1em;
&:nth-child(n+3) {
margin-bottom: 1em;
}
}

.toolbar {
Expand Down
16 changes: 13 additions & 3 deletions src/components/admin/Teams/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ export default () => {
</RectangleButton>
));
},
getProps: () => {
return {
class: "team-cell"
}
}
},
{
Header: 'Actions',
Expand Down Expand Up @@ -261,9 +266,14 @@ export default () => {
{
// Loop over the table rows
rows
.filter((row) =>
row.original.name.includes(search),
)
.filter((row) => {
const query = search.toLowerCase()
const obj = row.original;
return obj.name.toLowerCase().includes(query) ||
obj.description.toLowerCase().includes(query) ||
obj.members.some((member) => (member.firstName + member.lastName)
.toLowerCase().includes(query))
})
.slice(
page * rowsPerPage,
page * rowsPerPage + rowsPerPage,
Expand Down

0 comments on commit 7386c4f

Please sign in to comment.