Removing the Ability to Sort a Table

Hi All,

I'm looking for a way to remove the sort functionality from a specific table. The table only has one row (I'm using it like a progress bar) and I want to disable the ability for users to click the headers and sort the table. Is there any code I can use to achieve this?

Thank you in advance!

Worked like a charm! Thanks, Kelson!

Hi Matt, 

Here is some JavaScript I wrote really quick that will change the anchor HTML elements into spans so they will no longer be clickable. Be sure to change the "VIEWKEY" with the one that is loading the table. You can find your view key here:

Knack = Knack || {};
Knack.fn = Knack.fn || {};

Knack.fn.disableHeaders = function(viewKey){
Knack.$(`#${viewKey} table thead th a`).each((i, header)=>{

//Replace 'VIEWKEY' with your view key.
$(document).on('knack-view-render.view_VIEWKEY', function(event, view, data) {

If you have any further questions feel free to reach out.