Skip to content

[5.x] Fix values being wrapped in arrays causing multiple selected options #11630

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: 5.x
Choose a base branch
from

Conversation

simonworkhouse
Copy link
Contributor

Following on from #11333 and the related PR statamic-rad-pack/runway#654 this fix ensures that the HasSelectOptions field type trait correctly casts pre-processed values to an array even if they are collections.

This addresses issues caused both when extending a select fieldtype to utilise collections and issues caused by Runway changes where collection values are no longer being cast to arrays.

Fixes #11333
Replaces statamic-rad-pack/runway#654

@simonworkhouse simonworkhouse changed the title Fix values being wrapped in arrays causing multiple selected options [5.x] Fix values being wrapped in arrays causing multiple selected options Mar 28, 2025
@ozmos
Copy link

ozmos commented Apr 28, 2025

Any progress on this? Would be super helpful

@cameronjdavis
Copy link

+1

@duncanmcclean
Copy link
Member

Sorry, we don't have an ETA for reviewing/merging this pull request. We'll get to it when we can.

In the meantime, you can pull this PR into your project with a composer patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multi-select input shows selected options as a single array
4 participants