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 class="steps-container">
  <h3 class="title">To see how the issue is reproducible, please follow the steps below:</h3>
  <p>
  1. Create a calculated value named "My Calculation" with the formula: 
  <br>
  sum("Amount") + sum("Outstanding")
  <br>
  and click "Apply".
  <br>
  2. Click "Apply" in the Field List.
  <br>
  3. Now open the Field List again.
  <br>
  4. Please notice that the captions for "Amount" and "Outstanding" are left unchanged.
  <br>
  5. Now change the "My Calculation" calculated value's name to "My Calculation 1" and click "Apply".
  <br>
  6. Please notice that the captions for "Amount" and "Outstanding" are now changed.
  </p>
</div>
<div id="pivot-container"></div>

CSS

.title {
  text-align: center;
}
.steps-container {
  padding: 15px;
  background: #fdfd96;
}

JavaScript

var pivot = new Flexmonster({
  container: "#pivot-container",
  componentFolder: "https://cdn.flexmonster.com/",
  toolbar: true,
  report: {
    dataSource: {
      type: "json",
      data: getData()
    },
    slice: {
      rows: [{
        uniqueName: "Country"
      }, {
        uniqueName: "Category"
      }],
      columns: [{
        uniqueName: "Color"
      }, {
        uniqueName: "[Measures]"
      }],
      measures: [{
          uniqueName: "Amount"
        }, {
          uniqueName: "Outstanding"
        }
      ],
    }
  },
  width: "100%",
  height: 500
});

function getData() {
  return [{
    "Category": "Accessories",
    "Size": "262 oz",
    "Color": "red",
    "Destination": "Australia",
    "Business Type": "Specialty Bike Shop",
    "Country": "Australia",
    "Price": 174,
    "Amount": 225,
    "Outstanding": 23
  }, {
    "Category": "Accessories",
    "Size": "214 oz",
    "Color": "yellow",
    "Destination": "Canada",
    "Business Type": "Specialty Bike Shop",
    "Country": "Canada",
    "Price": 502,
    "Amount": 90,
    "Outstanding": 17
  }, {
    "Category": "Components",
    "Size": "235 oz",
    "Color": "green",
    "Destination": "Australia",
    "Business Type": "Warehouse",
    "Country": "Australia",
    "Price": 551,
    "Amount": 1950,
    "Outstanding": 51
  }, {
    "Category": "Components",
    "Size": "307 oz",
    "Color": "white",
    "Destination": "United Kingdom",
    "Business Type": "Warehouse",
    "Country": "Canada",
    "Price": 842,
    "Amount": 8212,
    "Outstanding": 55
  }, {
    "Category": "Bikes",
    "Size": "334 oz",
    "Color": "red",
    "Destination": "United States",
    "Business Type": "Value Added Reseller",
    "Country": "Canada",
    "Price": 738,
    "Amount": 35,
    "Outstanding": 28
  }, {
    "Category": "Bikes",
    "Size": "107 oz",
    "Color": "yellow",
    "Destination": "Australia",
    "Business Type": "Value Added Reseller",
    "Country": "France",
    "Price":...