My SearchComponent has a route (/search) and SearchDetailComponent has a route (/search-detail:id).
In the SearchComponent, there is a searchbox (input field) where I can type any text to start a search.
After loading the search results and navigating to the SearchDetail page, I want to store the search term I entered into the searchbox. However, this should only happen after returning from the Detail page. This means that when I navigate back from the detail page, the same text I searched for should be displayed in the searchbox.
The searchbox should remain empty while navigating to the search site from any other page.
Does anyone have an example or suggestion on how to implement this?