ahmedabdel3al / livewire-multiselect

Livewire Multiselect Component
https://ancient-gorge-62882.herokuapp.com/
MIT License
19 stars 6 forks source link

Broken when following docs #8

Open injektion opened 3 years ago

injektion commented 3 years ago

Livewire 8. Tailwind + alpinejs installed.

composer require bolyfci/livewire-multiselect

@stack('scripts') added to layout

using the fixed example from the pull request (with the missing '):

<x-multiselect
  wire:model="multiselect"
  :options="[['id' => 'laravel' , 'name' => 'Laravel'], ['id' => 'alpineJs', 'name' => 'Alpine JS'], ['id' => 'livewire', 'name' => 'Livewire']]"
 />

Ends up with:

Alpine Error: "ReferenceError: option is not defined"

Expression: "option[title]"
Element: <div class=​"text-xs text-white font-normal leading-none max-w-full flex-initial" x-text=​"option[title]​">​</div>​
handleError @ app.js:123

Is there something else that needs to be done or added to the docs to make it work?

andreaskviby commented 3 years ago

Any news arround this? It is not working as the docs says.