Open MohammaddReza opened 9 months ago
I have a similiar issue, although I'm not use wire-elements. If the simple-select is inside a child livewire component the population of options is not always working correctly. However, if I keep a second instance of simple-select on the parent page, the functionality seems to work more consistently.
When it's not working correctly inside a livewire child component, I am able to output the options variable and see the values. So I know it is getting passed correctly from the livewire component. But the id/name value pairs aren't shown in the select box. It is empty.
I suspect something is not getting initialized properly that is causing this behavior.
I have the same issue.
I had the similar issue, not only with this package, but also livewire-mapbox as well. I guess there's some code within the Wire-element's Modal that causes the component not being initiated properly. I haven't found the exact cause, but I'd love to see if you guys having workarounds after those times.
Hi, I hope this issue is still relevant and can help you guys. I found a workaround that works pretty well, but you have to:
Then, edit the resources/views/vendor/wire-elements-modal/modal.blade.php
, add the @include('simple-select::components.script')
just inside the <div>
where it has the x-data="LivewireUIModal()"
attribute.
Enjoy your working component, and happy coding.
I'm using wire-elements/modal module simple-select works very well outside of this module but it doesn't work in the module