wireui / wireui

TallStack UI components
https://v1.wireui.dev
MIT License
1.37k stars 166 forks source link

Multi Select options not showing as ticked in dropdown #741

Open gRoberts84 opened 7 months ago

gRoberts84 commented 7 months ago

Describe the bug When populating the form with existing content, the <x-select :multiselect="true" /> it will show the correct values within the closed select but when clicking on it, none of the options are ticked.

image image

To Reproduce Steps to reproduce the behavior:

  1. Popular multi-select with options.
  2. Render with property containing values that exist in options.
  3. See error

Expected behavior When the bound property has values that exist in options, they should be showing as ticked when expanding the dropdown.

Screenshots or Videos If applicable, add screenshots or videos to help explain your problem.

Dependencies

Desktop (If applicable, please complete the following information):

Additional context

<x-select wire:model="packages.{{ $packageModalOpen }}.sections" :multiselect="true" :options="array_filter($packages, fn($p) => !empty($p['name']))" option-description="null" option-value="id" option-label="name" />

If the bound sections property is empty and I select values, it correctly shows them as ticked etc however if it's already populated when rendering, it does not appear to be.

cakanm commented 2 months ago

I have the same issue but without console errors. Options are selected in input field but the tick is missing on dropdown. I've updated dependencies but that didn't help.