JSFiddle - React, Tailwind, and code Playground

by Flexmonster Pivot Table

HTML

<link rel="stylesheet" href="https://s3.amazonaws.com/flexmonster/2.3/demo.css">
<div id='description'>Hovering the "Open" tab of the Toolbar allows choosing from the list of predefined reports</div>

<script src="https://cdn.flexmonster.com/flexmonster.js"></script>
<div id="pivot-container"></div>

CSS

#description {
  margin: 10px;
  margin-top: 15px;
  font-size: 18px;
  font-weight: 500;
  font-family: Arial;
}

JavaScript

var pivot = new Flexmonster({
  container: "pivot-container",
  componentFolder: "https://cdn.flexmonster.com/",
  width: "100%",
  height: 430,
  toolbar: true,
  beforetoolbarcreated: customizeToolbar
});

function customizeToolbar(toolbar) {

  var tabs = toolbar.getTabs();

  toolbar.getTabs = function() {
    var remoteReports = [{
      title: "Report 1",
      id: "fm-tab-open-1-report",
      icon: this.icons.open_remote,
      handler: () => {
        pivot.load("https://cdn.flexmonster.com/reports/report.json");
      }
    }];

    (tabs[1].menu) = remoteReports;
    return tabs;
  }
}