Skip to content
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

Added $optgroupsAttributes parameter to select method. #416

Merged
merged 2 commits into from
Feb 4, 2018
Merged

Added $optgroupsAttributes parameter to select method. #416

merged 2 commits into from
Feb 4, 2018

Conversation

djh101
Copy link
Contributor

@djh101 djh101 commented Sep 9, 2017

Addresses the concerns in #129. This PR does the following:

  1. Adds a new $optgroupsAttributes parameter to the select method which is used to add attributes to optgroups. Previously attributes applied to a an array element that was an optgroup would apply the attributes to every option belonging to the optgroup (rather than the optgroup itself).
  2. Increases the depth of $optionsAttributes by 1. To add attributes to options inside an optgroup, use the optgroup name as the key with an array of options and their attributes as the value. Previously there was no way to add attributes to options belonging to an optgroup individually.

See the formBuilderTest changes for an example implementation.

@tshafer tshafer merged commit 2dfc110 into LaravelCollective:master Feb 4, 2018
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.

2 participants