Problem/Motivation
The search text filter isn't working when the "Include filter by label" option is enabled for the Image Select element; it does not filter images.
Steps to reproduce
1. Create an Image Select element.
2. Check the "Include filter by label" checkbox in the element settings.
3. Try to use the search text filter.
Proposed resolution
We have to edit the following file: /webform/modules/webform_image_select/webform_image_select.libraries.yml.
js/webform_image_select.element.js: {} should be replaced with js/webform_image_select.element.js: {weight: -1}.
This way, we will include webform.filter.js after webform_image_select.element.js to ensure that the $('.js-images-filter .thumbnails') element is available before webform.filter.js attempts to access it.
Issue fork webform-3511937
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
cilefen commentedComment #4
jrockowitz commentedWe have been using this patch on production and it seem sreasonable that we want to ensure the
webform_image_select.elementlibrary loads afterwebform.filter.jsComment #7
jrockowitz commentedFixing in 6.2.x and 6.3.x