JSFiddle - React, Tailwind, and code Playground
by Flexmonster Pivot Table
HTML
<link rel="stylesheet" href="https://s3.amazonaws.com/flexmonster/2.3/demo.css">
<script src="https://cdn.flexmonster.com/flexmonster.js"></script>
<div id="pivot-container"></div>
JavaScript
let pivot = new Flexmonster({
container: "pivot-container",
componentFolder: "https://cdn.flexmonster.com/",
height: 400,
toolbar: true,
beforetoolbarcreated: customizeToolbar,
report: {
dataSource: {
filename: "data/data.json"
}
}
});
function customizeToolbar(toolbar) {
let tabs = toolbar.getTabs();
toolbar.getTabs = function() {
let exportIdx = tabs.findIndex(x => {
return x.id === "fm-tab-export"
})
tabs[exportIdx].handler = customMenuHandler;
delete tabs[exportIdx].menu;
return tabs;
}
}
function customMenuHandler() {
alert("Custom export menu")
}