JSFiddle - React, Tailwind, and code Playground

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

var pivot = new Flexmonster({
  container: "pivot-container",
  componentFolder: "https://cdn.flexmonster.com/",
  width: "100%",
  height: 500,
  toolbar: true,
  beforetoolbarcreated: function (toolbar) {
                var tabs = toolbar.getTabs();
                toolbar.getTabs = function () {
                    tabs[2] = {
                        id: "fm-tab-newtab",
                        title: "Sauvegarder",
                        handler: customSave,
                        icon: this.icons.save
                    };
                    tabs[3] = {
                        id: tabs[3].id,
                        title: tabs[3].title,
                        icon: tabs[3].icon
                    };
                    return tabs;
                }
            },
  report: {
    "dataSource": {
      "type": "api",
      "url": "http://olap.flexmonster.com:9202/api/cube",
      "index": "fm-product-sales",
    },
    "slice": {
      "rows": [{
        "uniqueName": "Business Type"
      }],
      "columns": [{
        "uniqueName": "[Measures]"
      }],
      "measures": [{
        "uniqueName": "Price",
        "aggregation": "sum"
      }]

    }
  }
});

var customSave = function () {

var report = flexmonster.getReport();
console.log(report);
};