Keeping the same state? Something like old('')?

Hey, I have a search dropdown which when I press submit (to submit the form), triggers a search function via a Livewire controller and returns the results without reloading the page.

As the dropdown is a Livewire component, pressing submit reloads the component, and if the user opens the dropdown again, the previously entered data is gone.

How can I keep it so the user’s form input is saved after the component refreshes?

Are you clearing out whatever form data you have on submit? If you have your input bound as wire:model the data should persist until you tell it to clear out.

If you can post your code, it will help in figuring out where the issue lies.

I’m a total noob and forgot to use wire:model - thanks for helping out :slight_smile: