This will cause the select to mistake them as "opt groups", and inside the @foreach loop on the option, it will throw an error because it will try to iterate over a string instead of an array.
This PR will normalize the options the same way that x-custom-select does, and will fix this issue. The x-select component will no longer try to render them as opt groups.
In the
x-select
component, simple array options are not being mapped correctly and causing errors to be thrown.This will cause the select to mistake them as "opt groups", and inside the
@foreach
loop on the option, it will throw an error because it will try to iterate over a string instead of an array.This PR will normalize the options the same way that
x-custom-select
does, and will fix this issue. Thex-select
component will no longer try to render them as opt groups.