Reset search when changing member sorting

This commit is contained in:
Tanner Collin 2021-07-29 01:02:57 +00:00
parent 349b5941fb
commit f88292a305

View File

@ -90,6 +90,10 @@ export function Members(props) {
}); });
}, [search, sort]); }, [search, sort]);
useEffect(() => {
setSearch({seq: 0, q: ''});
}, [sort]);
return ( return (
<Container> <Container>
<Header size='large'>Member List</Header> <Header size='large'>Member List</Header>
@ -156,7 +160,7 @@ export function Members(props) {
} }
</Item.Group> </Item.Group>
{numShow !== 100 ? {response.results.length > 20 && numShow !== 100 ?
<Button <Button
content='Load More' content='Load More'
onClick={() => {setNumShow(100); numShowCache = 100;}} onClick={() => {setNumShow(100); numShowCache = 100;}}