This release is thanks to work by @AleksandrSpicyn - thank you!
- Bug fix for selection logic for Select and Checkable fields (#617)
Can now build dynamic radio() and checkbox() groups using collection-driven definitions, without requiring external transformation logic. (TODO for anyone interested: document some examples for this)
Select (Former\Form\Fields\Select)
- Fixed an edge case where previously selected values could persist due to missing state reset:
- Added clearSelected() method to ensure no stale selected attributes remain before rendering.
- Improved type-safety when comparing numeric values
- Enhanced addOption() to support optgroup with nested options that include attributes (not just text).
- Preserved backward compatibility by retaining existing behavior unless extra attributes are passed.
Checkable (Former\Traits\Checkable)
- Restored and improved the fromQuery() method:
- Now supports passing closures for $text and $attributes, consistent with Select::fromQuery().
- Refactored internal items() method to accept Eloquent/Fluent collections
- Now matches behavior of Select, including array_flip() fallback for simpler usage.