Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Commit

Permalink
Fix broken search input in Settings / The Team
Browse files Browse the repository at this point in the history
  • Loading branch information
josetr committed Feb 13, 2023
1 parent 1ed6ff3 commit 277de33
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/templates/user-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const UserTable: React.FC<UserTableProps> = ({
const [selectedInvite, setSelectedInvite] = useState<Invite | null>(null)
const notification = useNotification()
const { store, isLoading } = useAdminStore()
const [query, setQuery] = useState("")

useEffect(() => {
setElements([
Expand Down Expand Up @@ -261,6 +262,7 @@ const UserTable: React.FC<UserTableProps> = ({
]

const handleUserSearch = (term: string) => {
setQuery(term)
setShownElements(
elements.filter(
(e) =>
Expand All @@ -278,6 +280,7 @@ const UserTable: React.FC<UserTableProps> = ({
filteringOptions={filteringOptions}
enableSearch
handleSearch={handleUserSearch}
searchValue={query}
>
<Table.Head>
<Table.HeadRow>
Expand Down

0 comments on commit 277de33

Please sign in to comment.