- Issue created by @2dareis2do
- π³π±Netherlands idebr
For AJAX to update the URL you can install this contrib module: https://www.drupal.org/project/views_ajax_history β
- π¬π§United Kingdom 2dareis2do
Thanks!
I was thinking of creating a module called search_api_views_ajax, having now having seen view_ajax_history I not sure this is necessary any longer.
I was struggling to see how to enable it as there is no README with the module but figured it out and can confirm it works well with Apache Solr. I like the ability to switch on and off for each view. I have attached a screenshot for other who might be wondering where to find the switch.
- Status changed to Fixed
10 months ago 12:52pm 8 September 2023 - π¬π§United Kingdom 2dareis2do
Ok, I have evaluated the views_ajax_history module, and while it works reasonably well it has a couple of issues.
1. it adds page pagination to the ajax query. This is not something that can be easily disabled. One consequence of this is that when navigating back to the view form another page invariably the page will reload and will only show the page in the query string. Although you can force the view to load all results this does come with a performance hit (especially for larger indexes).
2. I had n't really considered this behaviour until looking at views_ajax_history, but when clicking the browser back button it does not seem to load the current page context (search query string) without doing a manual browser refreshSo, I decided to write something that addresses these issues, namely only really handling the search query string when using the a 'full text search field'. This should work across all ajax enabled sites once the search_api_ajax_views module is enabled. Additionally results should be updated asynchronously when navigating back through the history.
https://www.drupal.org/project/search_api_views_ajax β
Hopefully this will help others with similar requirements.
Automatically closed - issue fixed for 2 weeks with no activity.