Comments

Valentine94 created an issue. See original summary.

valentine94’s picture

Title: Allow status and type properties being used as select2 exposed filters » Allow dropdown fields being used as select2 widgets
Status: Needs review » Needs work

Update title

valentine94’s picture

Status: Needs work » Needs review
StatusFileSize
new6.1 KB

Added new config to globally enable all
elements being used as a Select2 widgets, patch with code changes and test attached

matsbla’s picture

It looks like the option "Limit search box visibility by list length" do not apply to
elements using the global config.

Also, it doesn't work for
elements with optgroup, as example enable the option and go to 'admin/structure/types/manage/article/fields/add-field' - with this option enabled there are no options.
Not sure why as it should be supported; https://select2.org/options#dropdown-option-groups

Maybe there should be an option to disable it on admin pages?

I made a small fix on config form

matsbla’s picture

valentine94’s picture

OK, I've added an additional code for the limited search feature and added option for disabling it on admin pages. Few more tests for these features added as well.

Will take a look what's wrong with optgroups

valentine94’s picture

OK, fixed bug with optgroup, patch updated

matsbla’s picture

Thanks it works good!
I just made a small reordering of options on form setting.

  • matsbla committed 150c0fc on 8.x-1.x
    Issue #2951943 by Valentine94, matsbla: Allow dropdown fields being used...
matsbla’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.