- π³π±Netherlands gaele
If I try patch #40 with 2.0.6 the filters work correctly but no longer use Ajax, i.e. the whole page is refreshed.
- last update
about 1 year ago 424 pass, 2 fail - πΊπΈUnited States recrit
The attached patch has the following updates:
- Removed
jQuery.once()
. This is no longer available in D10+. - Updated selector that finds the views exposed FORM element. This adds support for multiple exposed forms for the same Views display on the same page. See http://drupal.org/node/2894747
- Removed
- last update
about 1 year ago 424 pass, 2 fail - last update
about 1 year ago 424 pass, 2 fail - πͺπΈSpain pcambra Asturies
#44 is working great, I had some issues with the facet settings being empty when adding more facets that are not sliders, I think checking for an object is safer.
- πΊπΈUnited States recrit
The test failures are caused by the view_id and display_id bleeding into the URL query parameters.
--- Expected +++ Actual @@ @@ -'route:view.search_api_test_view.page_1;arg_0&arg_1&arg_2?f%5B0%5D=owl%3Afuzzy' +'route:view.search_api_test_view.page_1;arg_0&arg_1&arg_2&view_id=search_api_test_view&display_id=page_1?f%5B0%5D=owl%3Afuzzy'
- last update
about 1 year ago 424 pass, 2 fail - πΊπΈUnited States recrit
This updated patch only parses the query string when there is a query string. This fixes views adding an extra query parameter with the full href as the property name.
- Status changed to Needs work
about 1 year ago 1:33pm 27 September 2023 - πͺπΈSpain pcambra Asturies
Found an issue probably related to π Ajax Facets do not support Range Slider Needs review , the slider themselves work fine, but they do remove and override the search query from other facets and exposed filters (this is not the behavior from other facet types after this patch)
- πΊπΈUnited States recrit
@pcambra do you mean that slider does not work correctly after patch #47, #45 or both?
- πͺπΈSpain pcambra Asturies
@recrit both but I think it a more deep issue than the latest fixes, there's a bit of code after "// Update view on slider trigger." that takes care of updating the view and that refresh works correctly but both the url and the other facets get deselected/emptied.
- Status changed to Needs review
about 1 year ago 9:05am 29 September 2023 - last update
about 1 year ago 424 pass, 2 fail - πͺπΈSpain pcambra Asturies
Minor changes above that I've been testing, we don't need to update 2x if we're on a slider, and I've been adding improvements to the slider.js on β¨ Range slider should use javascript events Needs review so it actually refreshes with ajax.
However, we still have the issue that everything else is lost when refreshing the slider with ajax (it loses context), and that's where the idea on π Ajax Facets do not support Range Slider Needs review although a bit crafty, fixes the issue caused by blindly retrieving the href from the settings:
var href = settings.facets.sliders[facetId].url.replace('__range_slider_min__', ui.values[0]).replace('__range_slider_max__', ui.values[1]);
- last update
about 1 year ago 424 pass, 2 fail - πΊπΈUnited States recrit
I do not have any sliders enabled on my search pages which is resulting in this error:
Uncaught TypeError: settings.facets.sliders is undefined
I updated the check for
typeof settings.facets.sliders[facetId] !== 'object'
to also check for its existence. - πͺπΈSpain pcambra Asturies
@recrit: thanks! do you think that it would be a better fit to instead of taking care of possible sliders, launch an event that each widget could subscribe to refresh the views? seems to me that there's a lot of code on this ajax views file atm and some of them makes no sense if you don't have the slider submodule enabled.
- πΊπΈUnited States recrit
@pcambra An event would be good. That would let other contrib modules and custom code to react to the changes as well.
- πΊπΈUnited States recrit
the attached patch adds the following:
- AJAX controller updates only from π Facets with AJAX not working in most of situations Needs review to properly set the session on the new request. The other changes in 3052574 conflict with this patch since it is trying to fix the JS and change how the blocks are rendered in the AJAX controller.- AJAX controller updates from π New $request created in FacetBlockAjaxController missing ajax_page_state RTBC to persist the "ajax_page_state".
- π§πΎBelarus VasiliyRepin Minsk
#57 I have been tested this patch. It works good for my tasks! Thanks!
- π§πΎBelarus VasiliyRepin Minsk
For using in ajax Views perfect Slider better than Ui - Facets range NoUiSlider β
you need to apply #57 and after need to apply this patch.