Skip to content

Commit

Permalink
MAT-6273: tab change display issue (#110)
Browse files Browse the repository at this point in the history
* clear filter when switching tabs

* reset filter on tab change

* fix api and filtering when searching
  • Loading branch information
chubert-sb committed Oct 10, 2023
1 parent 2c898ef commit 46caaee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/api/useCqlLibraryServiceApi.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export class CqlLibraryServiceApi {
},
params: {
currentUser: filterByCurrentUser,
signal,
},
signal: signal,
}
);
return response.data;
Expand Down
4 changes: 3 additions & 1 deletion src/components/cqlLibraryLanding/CqlLibraryLanding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ function CqlLibraryLanding() {
const submitFilter = (e) => {
e.preventDefault();
setFilter(filter.trim());
setCurrentFilter(filter);
if (cqlLibraryList != null && cqlLibraryList.length > 0) {
setCurrentFilter(filter);
}
};

const searchInputProps = {
Expand Down

0 comments on commit 46caaee

Please sign in to comment.