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="pivotContainer"></div>

JavaScript

var pivot = new Flexmonster({
  container: "pivotContainer",
  componentFolder: "https://cdn.flexmonster.com/",
  toolbar: true,
  report: {
    "dataSource": {
      "type": "json",
      "data": getData(),
      "mapping": {
        "VISUALSERIALNO": {
          type: "string"
        },
        "PRODUCT": {
          type: "string"
        },
        "MATERIALREASONNAME": {
          type: "string"
        },
        "QTY": {
          type: "number"
        },
        "user": {
          type: "string"
        },
        "WC_DEPT": {
          type: "string"
        },
        "TIMESTAMP": {
          type: "datetime"
        }
      }
    },
    options: {
      grid: {
        type: "flat"
      }
    }
  }
});

function getData() {
  return [{
    "VISUALSERIALNO": "449530-1",
    "PRODUCT": "00694.0006",
    "MATERIALREASONNAME": "Damage: Handling",
    "QTY": 1,
    "user": "Andy Smith",
    "WC_DEPT": "Default Department",
    "TIMESTAMP": null
  }]
}