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

Commit 112eee8

Browse files
authored
Fix broken search input in Settings / The Team
1 parent 1ed6ff3 commit 112eee8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/components/templates/user-table.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ const UserTable: React.FC<UserTableProps> = ({
4242
const [selectedInvite, setSelectedInvite] = useState<Invite | null>(null)
4343
const notification = useNotification()
4444
const { store, isLoading } = useAdminStore()
45+
const [query, setQuery] = useState("")
4546

4647
useEffect(() => {
4748
setElements([
@@ -261,6 +262,7 @@ const UserTable: React.FC<UserTableProps> = ({
261262
]
262263

263264
const handleUserSearch = (term: string) => {
265+
setQuery(term)
264266
setShownElements(
265267
elements.filter(
266268
(e) =>
@@ -277,7 +279,9 @@ const UserTable: React.FC<UserTableProps> = ({
277279
<Table
278280
filteringOptions={filteringOptions}
279281
enableSearch
282+
setQuery(term)
280283
handleSearch={handleUserSearch}
284+
searchValue={query}
281285
>
282286
<Table.Head>
283287
<Table.HeadRow>

0 commit comments

Comments
 (0)