Skip to content

Commit

Permalink
Remove the empty option from multiple-value select custom fields
Browse files Browse the repository at this point in the history
For multiple-value selects, unlike vanilla version where we need to keep
the empty option so users can easily deselect all real values, current
selectpicker version doesn't need this workaround, just like the previous
chosen version.
  • Loading branch information
sunnavy committed Feb 1, 2024
1 parent 5afd223 commit cc5b909
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion share/html/Elements/EditCustomFieldSelect
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ my $use_chosen = CachedCustomFieldValues($CustomField)->Count >= 10 ? 1 : 0;
$m->callback( CallbackName => 'Chosen', UseChosen => \$use_chosen, CustomField => $CustomField );

# it's weird to see "(no value) X" in the input when selecting multiple values
$show_empty_option = 0 if $use_chosen && $Multiple;
$show_empty_option = 0 if $Multiple;
</%init>
<%ARGS>
$Object => undef
Expand Down

0 comments on commit cc5b909

Please sign in to comment.