Search Input and Menu

Hello,
I wish you all a good Monday!
My problem today is that when I click on “Jeux” in my menu, the “Search Input” search bar empties. Is this possible?

Thank you

You would like the search bar on the Jeux collection to remain persistent? The behavior of the search feature on a collection is that it resets when a screen is reloaded.

ERRATUM: The default behavior of the search bar is persistent. My misunderstanding.

If you want more control over the behavior of the search bar, then I think you would need to build your own search function with a helper table.

What I want is let’s imagine: I’m looking for the Minecraft game. Then, in my menu, I click on “jeux”, I want the content in the search bar to be erased.

For now, I have managed to make the content disappear if I click on the game that appears. But I would like that even without clicking on the game, if I go to the “jeux” menu, it disappears

I just understood that the native search bar does have persistent behavior. I had to go check to be certain, my apologies.

That’s how the native search bar works: it doesn’t reset.

If you want more control over a search bar, I think you would need to build one with a helper table. The idea would be to have an text entry component on your screen, the collection would be filtered based on the text, and whenever the user would click away from the screen the input field would be cleared.

If the search term had multiple words, I don’t know which of the AND and OR operators would kick in.

This seems like a lot of effort when all the user needs to do is click on the x to clear the native search bar.

I admit that it seems very complicated to me. I want to do this because my application allows you to put opinions, comments etc. At games, the problem is that I have two pages: the games page (with recommendations, popular games,…) and I have the search page. When a player searches for a game on the search page BUT does not click on a game that appears and returns to the “games” page, the recommendations change and it is the game sought that appears



Do you think it’s possible to make the search bar return to another database? For example, send the query to a huge list and not just the ones currently on it?

When you go to the Recherche tab, search “Minecraft”, it filters all items that include “Minecraft”, and then when you navigate to the Jeux tab, the collections are still filtered to items that include “Minecraft”?

If that is the behavior, I feel like it should.

On the Recherche tab, you used the native search feature you find the options of the collection?

No, basically, I’m using an API with JSON, so I had to create a text entry that searches the search URL. But then, if I just search via the search bar, it only shows the first 10 that are present in the database, not the others.


And since Minecraft, for example, isn’t in the top 10, it doesn’t find it. If I search via the one I’ve set up, search url, it works. But then, if the person leaves a message in the search url, and comes back to “games”, it leaves the game they’re looking for.

Ah. I have absolutely no clue. Sorry :man_shrugging:

The only idea that comes to mind would be to have a hint text on the Jeux tab just below the Recommandations collection saying something like “Basés sur la recherche ‘xyz’.” and showing the search term used on the Recherche tab. The user could then navigate back to the Recherche tab and clear their search query, or you could add a button below the hint text to clear the query. Something like that. But I’ve never implemented something like that, this is all assumptions.

Maybe someone else will be able to chime in.

What does the “Jeux” tab contain? We can’t have an action tied to a “tab click” even if you use a custom search flow.

Sorry if I’m not following but why only the first 10?