Make display of `emptyLabel` optional
See original GitHub issueCurrently there’s no way to disable displaying the emptyLabel
. It feels overkill to completely write the rendering of all items just to toggle this behavior on/off.
It would be nice to be able to toggle the “empty item” on/off either through an option (e.g. displayEmptyLabel=false
) or through some sort of convention (e.g. emptyLabel=""
means don’t display it).
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Empty Label ChoiceField Django - Stack Overflow
Is there a way to set an empty_label , or at least show a blank field? Forms.py: thing = forms.ModelChoiceField(queryset=Thing.objects.all(), ...
Read more >Dropdown shows text "empty" instead of blank label #9722
My workaround for showing an empty dropdown is using the non-breakable space \xa0 for the empty label. This avoids the collapsing dropdown mentioned...
Read more >Solved: JQL excluding label while keeping empty label issu...
Solved: Hi, I'm trying to exclude a label and found a solution, except that it excludes empty labels. Does anyone know of a...
Read more >Select widget: Empty Label configuration [#3291676] | Drupal.org
For Basic page I need empty label "- None -" and for this I configured Field setting "Allowed number of values" to "Unlimited"...
Read more >Use mail merge to create multiple labels - Microsoft Support
If you wanted to create and print a bunch of recipient address labels, you could type them all manually in an empty label...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Apologies for the delayed response. The use case is: I want to suggest options to the user, but not necessarily treat these options as “a list of valid inputs”. So if the user types “Some long string” and I have no good options to show them, then it would be nice to have a way not to display anything, instead of displaying the exact “Some long string” again.
Especially so if “Some long string” is not on my list of options, but will rather be created once the user submits the form, for example.
This is available in v1.0.0