JSFiddle - React, Tailwind, and code Playground
by Flexmonster Pivot Table
HTML
<script src="https://cdn.flexmonster.com/flexmonster.js"></script>
<div id="pivot-container">The component will appear here</div>
CSS
#fm-pivot-view .fm-grid-row,
#fm-pivot-view .fm-grid-row-mobile {
min-height: 40px;
max-height: 120px;
height: 65px !important;
}
#fm-pivot-view .fm-grid-column,
#fm-pivot-view .fm-grid-column-mobile {
min-width: 90px;
max-width: 100px;
}
.fm-cell {
white-space: pre-wrap !important;
}
JavaScript
var pivot = new Flexmonster({
container: "pivot-container",
componentFolder: "https://cdn.flexmonster.com/",
toolbar: true,
report: {
dataSource: {
data: getData()
},
tableSizes: {
rows: [{
height: 40,
idx: 0
}]
},
options: {
grid: {
type: "flat"
}
}
}
});
function getData() {
return [{
"Color": {
type: "string"
},
"Price": {
type: "number"
}
},
{
"Color": "bluee blueeeee blue blue blueeeeee",
"Price": 174
}, {
"Color": "red",
"Price": 30
}
];
}