filamentphp / filament

A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
https://filamentphp.com
MIT License
18.41k stars 2.87k forks source link

UI Broken when CheckboxList/Select(with `->multiple()`) create on the fly #11123

Closed samlm0 closed 8 months ago

samlm0 commented 8 months ago

Package

filament/forms

Package Version

v3.2.16

Laravel Version

v10.42.0

Livewire Version

v3.4.2

PHP Version

8.3.2

Problem description

I think it's the user interface bug.

CheckboxList always return boolean to backend data Select (with ->multiple()) show is required, but option has been selected

Expected behavior

I would expect the the component can work like normal

Steps to reproduce

CleanShot 2024-01-28 at 23 21 12

Reproduction repository

https://github.com/samlm0/filament/tree/bug_select_multiple

Relevant log output

No response

danharrin commented 8 months ago

Please check this - https://filamentphp.com/docs/3.x/forms/advanced#dynamic-fields-based-on-a-select-option

You need to ->fill() the container otherwise the data is not structured correctly.