Skip to content

Fixes #15971: Preserve 'none' selection in filter form fields #19310

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

Merged
merged 1 commit into from
Apr 28, 2025

Conversation

jeremystretch
Copy link
Member

Fixes: #15971

If null_option set on the field, convert its choices attribute from ModelChoiceIterator to a list and insert the null option. This allows it to be displayed as a selected choice when the widget is rendered.

@jeremystretch jeremystretch requested review from a team and bctiemann and removed request for a team April 24, 2025 15:44
@bctiemann bctiemann merged commit bdef00f into main Apr 28, 2025
10 checks passed
@jeremystretch jeremystretch deleted the 15971-preserve-null-filter branch April 28, 2025 12:55
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"None" filter selection gets lost on adjustment of filter
2 participants