UI: Fixed issue with suggestion overlay staying after redirection to the result (#7808)

* Fixed issue with suggetion overlay staying after redirection to the result

* fixed failing cypress test for my-data spec
This commit is contained in:
Aniket Katkar 2022-09-30 20:19:29 +05:30 committed by GitHub
parent eb4747362d
commit 5c5c305813
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@ describe('MyData page should work', () => {
};
const checkRecentlySearchElement = (term) => {
searchEntity(term);
searchEntity(term, false);
cy.clickOnLogo();
cy.get(`[data-testid="search-term-${term}"]`)
.scrollIntoView()

View File

@ -75,6 +75,7 @@ const Appbar: React.FC = (): JSX.Element => {
const handleSearchChange = (value: string) => {
setSearchValue(value);
value ? setIsOpen(true) : setIsOpen(false);
};
const supportLinks = [

View File

@ -298,7 +298,6 @@ const Suggestions = ({ searchText, isOpen, setIsOpen }: SuggestionProp) => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(res.data as any).suggest['metadata-suggest'][0].options
);
setIsOpen(true);
} else {
throw jsonData['api-error-messages']['unexpected-server-response'];
}