Hi,

Thank you for your work on this project.

Trying to use the module with an entity browser configured with a view as selection manager, but unfortunatly, the multi-selection is not working after appying ajax filters.

Notice that the double click on single item works perfectly.

Comments

grumpy74 created an issue. See original summary.

rich.yumul’s picture

I've observed this behavior too.

rajab natshah’s picture

Assigned: Unassigned » rajab natshah
Status: Active » Needs work

Thanks for reporting :)
Troubleshooting the wrong behaviour.

k3vin_nl’s picture

StatusFileSize
new973 bytes

Looks like the javascript doesn't respect the context properly, causing the event handler to be attached multiple times.
I have added a patch that should fix this.

k3vin_nl’s picture

Status: Needs work » Needs review
k3vin_nl’s picture

StatusFileSize
new961 bytes

(Updated the patch to use the correct file structure.)

rajab natshah’s picture

rajab natshah’s picture

Title: Not working with selection by views with exposed filters » Fixed to respect the context properly, which was causing the event handler to be attached multiple times, Not working with selection by views with exposed filters

  • RajabNatshah committed edcd909 on 8.x-1.x authored by K3vin_nl
    Issue #2894829 by K3vin_nl, RajabNatshah, grumpy74, rich.yumul: Fixed to...
rajab natshah’s picture

Committed ... Thank you :)

rajab natshah’s picture

rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
Status: Needs review » Fixed
k3vin_nl’s picture

Status: Fixed » Needs work

Hi, thanks for accepting my patch.
I just saw however that when I created my patch, I missed one line.

The context also needs to be added on line 71:
$('form.entity-browser-enhanced.multiselect .view .views-col', context).on('dblclick', function () {

extect’s picture

The patch committed in #9 is causing problems and makes image selection stop working as soon as I click on apply in exposed filters in the view (using inline entity form, entity browser and entity browser enhanced). Double-click is working, though. Removing the changes from #9 makes everything work again.
The changes suggested in #13 make even double-click stop working.

k3vin_nl’s picture

StatusFileSize
new1.87 KB

I saw that the patch indeed did not fix the issue completely, so I did some more debugging.
After an ajax refresh the 'context' that would get passed to the entityBrowserMultiselect function was the complete form. This caused the $('form.entity-browser-enhanced.multiselect .view .views-col', context) selector to not select anything after an ajax refresh.
I changed this for a smarter way of selecting the columns, so this patch should hopefully fix the issue.

k3vin_nl’s picture

Status: Needs work » Needs review
merilainen’s picture

Tested the functionality and works nicely. Maybe the console debug messages should be removed from code?

k3vin_nl’s picture

Ah, yes, the debug messages shouldn't have been in there. I'll update the patch!

k3vin_nl’s picture

StatusFileSize
new1.79 KB
rajab natshah’s picture

Thank you Kevin,
Testing the issue
console.log should be removed from your patch as you remarked.

brtamas’s picture

Hi All,

I still had some error with the working. I attach another patch, maybe it solves more case.

brtamas’s picture

Here is a better one

  • RajabNatshah committed 99bc1a1 on 8.x-1.x authored by brtamas
    Issue #2894829 by K3vin_nl, brtamas, RajabNatshah, grumpy74, extect,...
rajab natshah’s picture

Status: Needs review » Fixed
Issue tags: +entity_browser_enhanced-8.x-1.0-rc1

Committed ... Thank you :)

rajab natshah’s picture

Status: Fixed » Closed (fixed)