Skip Navigation

[Resolved] Ajax sorting not working on tables

This thread is resolved. Here is a description of the problem and solution.

Problem:
Can you update sortable tables with ajax?

Solution:
No. They must be updated via page reload.

This support ticket is created 6 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 4 replies, has 3 voices.

Last updated by davidS-53 6 years, 6 months ago.

Assisted by: Nigel.

Author
Posts
#908698

I am trying to: Enable AJAX sorting of table columns in a view.

I have several views loading in modals- so obviously a full refresh on a column sort is going to close the modal. I've enabled " AJAX results update when visitors change any filter values" but this doesn't appear to make a difference?

#908759

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Brad

Sortable tables update via page refresh, there is no option to update them with ajax.

Which, yes, means that you cannot use them inside a modal, the modal will be lost when you update the page.

I don't see any workaround in this case, you would need to re-think how you present such a View.

As an aside I did note that sortable tables made with the current stable plugin versions don't appear to be working correctly, the column headers are missing, and I am reporting that.

#909133

Are there any plans to get this working? I saw a couple of threads from 12+ months ago saying it was being worked on? Seems like an oversight that the AJAX stuff works for all the filtering but not searching...

#909237

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Brad

I spoke with the developers about this who said there are a number of gotchas that make ajax updates for sortable tables more complex than other front-end pagination and search controls, which is why it wasn't initially implemented that way.

They are open to working on it, but it will be handled as per other requests, which means evaluating how popular the request is in the context of the work required. We don't currently have many people asking for this, but we will be implementing a public feature request system where users can vote which will give us a better idea of the demand for individual features.

Anyway, I've made sure to log the request, which is all I can do for now.

#909287

Thanks Nigel, no worries. Guess i'll have to try to find another way around it. Cheers.