How to remember dropdown user input / remember page (pagination)

I am building a single niche business directory website, users should filter the results by a drowpdown element and results showing with a repeater connected to a collection database. Everything is working great but the problem is that the filter options gets reseted every time the user comes back to the page, and the pagination starts again from the first page.
To explain it better the process is like this: The user filters the database, finds an item they want to read up on, clicks on the item, goes to the dynamic page and when they finished reading they then click “go back” to get back to the repeater. When they get back to the repeater page the filter options resets so the user has to set the filter again to see the results they are looking for. My questions is if it’s possible to make it so the website remembers what filter selections the user selected and keep filtering the repeater like that until the user changes the filter manually.


the code i am using to filter the dropdown till now:

import wixData from 'wix-data';
export function dropdown1_change(event) {
	let proastio = $w('#dropdown1').value;
    $w('#dynamicDataset').setFilter(wixData.filter().contains('proastio', proastio));
}

best regards
thanks in advance for any help​:blush::blush::blush:

You can look at using Wix Storage to save the users chosen dropdown value and then get it again and automatically have the dropdown set to that value again.

You can also use the same API to clear it as well if the user wants to do another search with a different value for example.

https://www.wix.com/corvid/reference/wix-storage.html

i tried but still can’t solve it out
could you please give me an example with a sniped code?

thanks in advance for your help

Have a search of the forum as there are previous posts about it even from this past week.
https://www.wix.com/corvid/forum/community-discussion/is-there-basic-or-super-simple-code-for-if-and-else-statements-that-show-or-hide-based-on-the-text-present