Is there a thread to submit possible errors?
Anyway, with this code
$(document).ready(function () {
var table = new Tabulator("#overzicht73", {
footerElement:"<div class='tabulator-footer'><button>Custom Button</button></div>"
});
});
I get the following console error :
jquery-3.3.1.js:3827 Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.
at FooterManager.activate (tabulator-4.0.js:5921)
at Tabulator._buildElement (tabulator-4.0.js:6511)
at Tabulator._create (tabulator-4.0.js:6422)
at new Tabulator (tabulator-4.0.js:5962)
at HTMLDocument.
at mightThrow (jquery-3.3.1.js:3534)
at process (jquery-3.3.1.js:3602)
Maybe has something to do with the jquery wrapper, or I have to change it to a dom node (like in the code changes example) , but then it's not clear to me how.
Thanks and great work !
Hey @tomvanlier
Thanks for the heads up, i have just pushed a fix for that to the 4.0 branch.
For your information you can pass one of three things to the footerElement option:
the element outside the table where you would like the footer to appear:
<div id="page-controls"></div>
<div id="example-table"><div>
var table = new Tabulator("#example-table", {
footerElement: getElementById("page-control");
});
the selector for the element outside the table where you would like the footer to appear:
var table = new Tabulator("#example-table", {
footerElement: "#page-control",
});
or the contents you want added to the built in footer element
var table = new Tabulator("#example-table", {
footerElement: "<button>Custom Button</button>",
});
In your case you want to use the third option, and you dont need to worry about wrapping it in a footer element.
I hope that helps,
Cheers
Oli :)
hello!, i wonder that how can add click event on footherElement's button click event??
Can I do this??
<button onclick="myFunction()">Click me</button>
You can do that, it works like a charm.