Ajaxinate icon indicating copy to clipboard operation
Ajaxinate copied to clipboard

Added Loading Event Functions

Open matthewlyons opened this issue 4 years ago • 2 comments

Hello All,

This is my first ever PR so I hope I don’t screw it up too bad. I’ve added a function that fires before the get request called loadingStart and changed the callback function to be loadingEnd to match.

These events allow users to make changes to the DOM outside of the pagination div (ie: show and hide a loading spinner or a modal), or fire off other events like Google Analytics tracking.

I have also added a setting useDefault which is true by default but if set to false removes the function that edits the pagination link to show the loading text.

That’s it. Let me know if there’s anything you’d like me to improve on!

matthewlyons avatar Apr 22 '20 05:04 matthewlyons

@matthewlyons This looks great! I’ll review fully ASAP. Nice one! Most of us don’t do anywhere near as well in our first PR. I definitely didn’t 😅

Cam avatar Apr 24 '20 13:04 Cam

Thanks Cam! Let me know if there's anything you'd like me to change!

matthewlyons avatar Apr 28 '20 21:04 matthewlyons