Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search app searchbar disappearing #199

Open
Ducica opened this issue May 3, 2024 · 0 comments
Open

Search app searchbar disappearing #199

Ducica opened this issue May 3, 2024 · 0 comments

Comments

@Ducica
Copy link

Ducica commented May 3, 2024

Package version (if known):Latest

Describe the bug

Search bar disappears from the search app

Steps to Reproduce

Reduce the screen size so that the facets sidemenu would get hidden. Open the facets side menu, then close the side menu. The search bar disappears both from the page header as well as from the right hand side menu that contains the side bar on smaller screens (actually it disappears as soon as you open the facets menu).

Expected behavior

The search bar should still be in the UI

Screenshots (if applicable)

image

The problem is that facet sidebar handler is on the top level of the searchapp layout
const [sidebarVisible, setSidebarVisible] = React.useState(false);

When you open the facet sidebar, the app rerenders, but the node where the search bar tries to portal itself to does not exist in the dom currently (as it is hidden on smaller screens).

The solution is to put the facet sidebar state below the searchbar, so it does not get rerendered when facet sidebar is toggled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@Ducica and others