- 🇪🇸Spain plopesc Valladolid
Hello,
I've been digging into this one and it seems that
$form_state->getTriggeringElement()
is not returning the Reset button, but the tab selector button added inWidgetSelectorBase::getForm()
.Apparently, when clicking on the "Reset" button, the form being submitted is the parent one and to the views exposed one.
I have the feeling that will be necessary to add some JS in
entity_browser.view.js
to capture the Reset button event and proceed accordingly.Another option would be to load the view in
EntityBrowserForm::submitForm()
and compare the button value with the value stored in the view. However, that would open the door to inconsistencies with other modules like BEF or custom exposed form plugins.What do you think?
- 🇵🇱Poland Pawelgorski87
Morning,
I had 2 tabs, and reset button always setup 1st one after reload page/alax.
Patch #9 https://www.drupal.org/files/issues/2020-01-28/entity_browser-fix-for-re... →
works in my case.
Thank you. Drupal 10.4.6 PHP 8.3.16