Skip to content

Commit

Permalink
ensure isArchived persists into next render
Browse files Browse the repository at this point in the history
  • Loading branch information
engelhartrueben committed Sep 24, 2024
1 parent 01edd11 commit 8598a2f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/containers/AdminCampaignList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ const AdminCampaignList = ({
style={{ marginRight: "20px" }}
>
<MenuItem value={false}>Current</MenuItem>
<MenuItem value>Archived</MenuItem>
<MenuItem value={true}>Archived</MenuItem>
</Select>
<SortBy onChange={changeSortBy} sortBy={state.sortBy} />
</React.Fragment>
Expand Down Expand Up @@ -272,14 +272,15 @@ const AdminCampaignList = ({
const changeFilter = async newFilter => {
setState({
...state,
isLoading: true,
campaignsFilter: newFilter
campaignsFilter: newFilter,
isLoading: true
});
await data.refetch({
campaignsFilter: newFilter
});
setState({
...state,
campaignsFilter: newFilter,
isLoading: false
});
};
Expand Down

0 comments on commit 8598a2f

Please sign in to comment.