Выпадающий список с множественным выбором Select2 в LiveWire не работаетPhp

Кемеровские программисты php общаются здесь
Ответить
Anonymous
 Выпадающий список с множественным выбором Select2 в LiveWire не работает

Сообщение Anonymous »


I'm having a problem in making the multi-select dropdown of select2 work in my livewire code. In my code, there are radio buttons where a user will select either of those and then a dropdown will appear. Here are my codes.
DynamicERequestButton.php code:
public $selectedRadioButton = ''; public function showDropdown($type) { $this->selectedRadioButton = $type; } public function render() { return view('livewire.dynamic-e-request-button'); } dynamic-e-request-button.blade.php code: Machinery Facility Tools @if ($selectedRadioButton === 'Machinery') Machinery Type 4 Wheel Drive Tractor Rice Combine Harvester Hand Tractor with Accessories Hauling Truck Precision Seeder Pump and Engine Set Recirculating Dryer Riding-Type Transplanter Seed Cleaner Compact Ricemill Walk-Behind Transplanter Rice Thresher Seed Spreader @elseif ($selectedRadioButton === 'Facility') Facility Type Inspire RPC Warehouse @elseif ($selectedRadioButton === 'Tools') Tool Type Shovel Rake Sickle @endif I did some troubleshooting and I found out that I've made it work if I remove the dropdowns inside the if statement. But I need them to be inside the if statement because that was the purpose of the radio buttons.


Источник: https://stackoverflow.com/questions/781 ... ot-working
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Php»