Hi,

I am using Drupal 7.26 and Views 7.x-3.7 and created a block view for listing fields from a custom content type. The view is a table and in the table settings I made the columns sortable. The block is on the site's front page. It has four columns (the node title and three custom fields). I enabled Ajax sort and it works on the first two columns, but not on the last two. However, the Ajax sort does work on the node preview. I am not using a custom views template, although I have customised the page and node templates, but I did try other (unmodified) themes and the same problem. I also enabled the block on other pages, but still the same problem.

Any advice on getting the Ajax sort working for all columns? Thanks in advance.

Regards.

EDIT: I looked in Chrome's developer tools and for the column header links there is a "click" event listener for the first two columns, but not the last two.

Comments

P.Smith’s picture

Issue summary: View changes
8thom’s picture

Ran into this issue today - for AJAX sorting you need the default view classes set on each field, so make sure "Add default classes" is enabled in the "Style settings" of the field configuration.

fox_01’s picture

Status: Active » Closed (fixed)

#2 works. thanks

timfletcher’s picture

#2 worked for me. Should Views mention that default classes are required on Fields for AJAX sorting to work?

prakashsingh’s picture

#2 worked for me as well.

Thanks..