Pharaonic / livewire-select2

Simple way to handle the Select2 for livewire components.
https://pharaonic.io/packages/livewire/select2
MIT License
37 stars 11 forks source link

option disappear #7

Closed ree-grestark closed 1 year ago

ree-grestark commented 1 year ago

image I already include all js and css from documentation, but the option seems overridden by the select2

and can you explain where should this code placed? // Init Event $this->dispatchBrowserEvent('pharaonic.select2.init');

// Load Event $this->dispatchBrowserEvent('pharaonic.select2.load', [ 'component' => $this->id, 'target' => '#input-here' ]);

MoamenEltouny commented 1 year ago

$this->dispatchBrowserEvent('pharaonic.select2.init'); to reload all the Select2

$this->dispatchBrowserEvent('pharaonic.select2.load', [ 'component' => $this->id, 'target' => '#input-here' ]); to reload a specific Select2 input