Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Form] Keep preferred_choices order for choice groups#34083

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@vilius-g
Copy link
Contributor

QA
Branch?4.3
Bug fix?yes
New feature?no
Deprecations?no
Tickets
LicenseMIT
Doc PR

Since 4.3 ordering ofpreferred_choices is preserved when displaying form. But this only works for flat options. When the choices are grouped, the preferred groups are in default order.

Now the preferred choice group order is derived by taking the first matching choice frompreferred_choices and using its position to sort the groups.

Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

(with minor CS comment)

Copy link
Contributor

@HeahDudeHeahDude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM

@nicolas-grekasnicolas-grekas changed the titleKeep preferred_choices order for choice groups[Form] Keep preferred_choices order for choice groupsNov 28, 2019
@nicolas-grekas
Copy link
Member

Thank you@vilius-g.

nicolas-grekas added a commit that referenced this pull requestNov 28, 2019
…ius-g)This PR was squashed before being merged into the 4.3 branch.Discussion----------[Form] Keep preferred_choices order for choice groups| Q             | A| ------------- | ---| Branch?       | 4.3| Bug fix?      | yes| New feature?  | no| Deprecations? | no| Tickets       || License       | MIT| Doc PR        |Since 4.3 ordering of `preferred_choices` is preserved when displaying form. But this only works for flat options. When the choices are grouped, the preferred groups are in default order.Now the preferred choice group order is derived by taking the first matching choice from `preferred_choices` and using its position to sort the groups.Commits-------75404e5 [Form] Keep preferred_choices order for choice groups
@nicolas-grekasnicolas-grekas merged commit75404e5 intosymfony:4.3Nov 28, 2019
This was referencedDec 1, 2019
@vilius-gvilius-g deleted the optgroup-preffered-ordering branchFebruary 1, 2020 11:36
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@xabbuhxabbuhAwaiting requested review from xabbuhxabbuh is a code owner

@dunglasdunglasAwaiting requested review from dunglas

@lyrixxlyrixxAwaiting requested review from lyrixx

@srozesrozeAwaiting requested review from sroze

+1 more reviewer

@HeahDudeHeahDudeHeahDude approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

4.3

Development

Successfully merging this pull request may close these issues.

5 participants

@vilius-g@nicolas-grekas@HeahDude@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp