Jump to content
  • 0

Sorting column event listener




I have a large table which when displayed in a submission/report datapage takes a few seconds to process when a column is clicked to sort.

I'd like to display a 'spinner' so the User knows something is going on while waiting.

I can activate the spinner by placing some jQuery in the Header of the  'Configure Table Fields' page of the submission/report wizard.   Problem is that when a column is clicked to sort,  the spinner is not called immediately and only starts around half way through the processing time.  What I don't know is where to place my spinner jQuery code so it switches on as soon as the column is clicked to sort.

I tried the Header in the search page, but it doesn't get picked up from there.  Is there an event listener that could be used somewhere?


Many thanks 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0


Try adding a progress loading bar as suggested in the video below:

Adding a Progress Loading Bar to Caspio DataPages - YouTube

**Insert inside the Header of your DataPage**

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/pace/1.0.2/themes/black/pace-theme-loading-bar.css" />
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pace/1.0.2/pace.min.js"></script>

Pace.on("done", function(){
  setTimeout( function() { 
    document.getElementById( 'cb-content' ).style.display = 'block';
  }, 200);

<div id="cb-content" style="display:none;">


**Insert inside the Footer of your DataPage**




Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...