JSFiddle - React, Tailwind, and code Playground

by Flexmonster Pivot Table

HTML

<script src="https://cdn.flexmonster.com/flexmonster.js"></script>
<button onclick="save">
SAVE DATA
</button>
<div id="pivot-container"></div>

JavaScript

let pivot = new Flexmonster({
  container: "pivot-container",
  componentFolder: "https://cdn.flexmonster.com/",
  toolbar: true,
  //'ready' event ensures thar Flexmonster is ready to receive API calls
  ready: () => {
    fetch('https://cdn.flexmonster.com/data/data.json').then(response => response.json()).then(data => {
      pivot.setReport({
        dataSource: {
          data: data
        }
      })
    })
  }
});

function save() {
  pivot.save();
}