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

Fix broken search input in Settings / The Team #894

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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