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>
<p>
1. Drill down to Geo leaf<br>
2. Type and press Enter<br>
3. See the console output
</p>
<div id="pivot-container"></div>

CSS

.editable {
  padding: 0 !important;
  z-index: 1 !important;
}

.editable input {
  width: 100%;
  height: 100%;
  background-color: transparent;
  border: 0px solid;
  padding-left: 4px !important;

}

JavaScript

new Flexmonster({
  container: "#pivot-container",
  componentFolder: "https://cdn.flexmonster.com/",
  width: "100%",
  height: 600,
  toolbar: true,
  report: {
    dataSource: {
      type: "microsoft analysis services",
      /* URL to msmdpump.dll */
      proxyUrl: "https://olap.flexmonster.com/olap/msmdpump.dll",
      /* Catalog name */
      catalog: "Adventure Works DW Standard Edition",
      /* Cube name */
      cube: "Adventure Works"
    },
    "slice": {
      "rows": [{
        "uniqueName": "[Geography].[Geography]",
        "sort": "asc"
      }],
      "columns": [{
          "uniqueName": "[Product].[Category]",
          "sort": "asc"
        },
        {
          "uniqueName": "[Measures]"
        }
      ],
      "measures": [{
          "uniqueName": "[Measures].[Reseller Order Count]",
          "aggregation": "none",
          "active": true
        },
        {
          "uniqueName": "[Measures].[Discount Amount]",
          "aggregation": "none",
          "active": true
        }
      ]
    }
  }
});

flexmonster.customizeCell(function(cell, data) {
  if (data && data.type == "value" && !isNaN(data.value) && data.level == 3) {
    cell.addClass("editable");
    cell.text = `<input type="text" value="${data.label}" onchange="onChange(event)" data-cell='${JSON.stringify(data)}'>`;
  }
})

function onChange(event) {
	let modDataObj = {};
  modDataObj.newValue = event.target.value;
  modDataObj.cell = JSON.parse(event.target.getAttribute("data-cell"));
  modDataObj.oldValue = modDataObj.cell.value;
  modDataObj.delta = modDataObj.newValue - modDataObj.oldValue;
  console.log("cell:", modDataObj.cell);
  console.log("old value:", modDataObj.oldValue);
  console.log("new value:", modDataObj.newValue);
  console.log("delta:", modDataObj.delta);

  $.ajax({
    type: "POST",
    url: '/echo/json/',
    data: JSON.stringify(modDataObj),
    dataType: "json",
    success: function(data) {
      console.log("Data was successfully sent.");
  ...