Is there a way to create a ‘standalone’ pager? I’d like to create a pager which calls a JavaScript function on clicking one of the pager elements.
I tried creating the pager with the following code:
As I understand it, there should be some content within the div-element with the class “webix_pager”, but there isn’t. What am I doing wrong?
And an additional question: Is it possible (after having successfully created the ‘standalone’ pager) to call a JavaScript function with the onClick property within the pager (e.g. clicking the pager button with the number 3, first some data is loaded using AJAX and then this data replaces some other data within a datatable)?
Pager normally works in pair with some other component, so it waits for signal that master component is ready, and do not render self just after initialization
I have another problem. I tried to catch ‘onItemClick’ on the pager, but that does not work. As can be seen in the following snippet, a script error is thrown:
I can confirm the issue. Pager still expects that there must be a master object.
Fix will be included in the next build
For now, you can try to use the next workaround
Thank you. This solves the problem with the master object.
But unfortunately the pager still does not do, what I’d like it to. In the above snippet, the ‘onItemClick’ function is not called when I click on a pager-‘button’.
Is there a possibility to make a click on a pager-‘button’ call a function (with the content of the pager-‘button’ as argument - e.g. after clicking the button ‘2’ a function(2) is called)?
I haven’t been able to implement this behavior, so I’d be very happy for some advice.