Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Support simple array options in x-select #89

Merged
merged 2 commits into from
Mar 21, 2023
Merged

Conversation

rawilk
Copy link
Owner

@rawilk rawilk commented Mar 21, 2023

In the x-select component, simple array options are not being mapped correctly and causing errors to be thrown.

<x-select 
    :options="[
        'option_1',
        'option_2',
    ]"
/>

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.

@rawilk
Copy link
Owner Author

rawilk commented Mar 21, 2023

This PR will close #88

@rawilk rawilk merged commit 6c53c53 into main Mar 21, 2023
@rawilk rawilk deleted the bug_simple-select-value branch March 21, 2023 12:53
@rawilk rawilk added the bug Something isn't working label Mar 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant