jonassiewertsen / statamic-livewire

A Laravel Livewire integration for Statamics antlers engine
83 stars 14 forks source link

Select value not changing on frontend #48

Closed nmdgent-jefverme closed 8 months ago

nmdgent-jefverme commented 8 months ago

Hi

I have an issue with the value of my select not updating on the frontend.

image

Expected behaviour I Have two dropdowns with options to filter jobs (a statamic collection). One where you can select a location, one where you can select a campus. When a user changes the location dropdown, I want the campus select to reset to the default "Select" value.

Actual behaviour When a value is selected in the campus dropdown and a user changes the location dropdown, the value in my livewire component for campus resets to "", the URL parameter is removed, but the option stays selected on the frontend.

These are the properties image

This is how my selects are created in my antler template: image

This is how I reset my component value image

Anyone has any idea what's going on here?

nmdgent-jefverme commented 8 months ago

Tiny update: I've added the following code purely for fixing the visual issue of the selected option not updating: image

marcorieser commented 8 months ago

So its resolved now?

jonassiewertsen commented 8 months ago

I think this is resolved and might be a Livewire issue, not connected to the addon directly.

Please let me know if I am wrong.