logitude-dashboard-library 3.1.63 → 3.1.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -920,6 +920,7 @@ $dark-grey: #717585;
920
920
  font-weight: 500;
921
921
  text-align: right;
922
922
  color: #46494A;
923
+ cursor: pointer;
923
924
  }
924
925
 
925
926
  .dx-widget {
package/dist/index.js CHANGED
@@ -1630,7 +1630,27 @@ var PivotTable = React.forwardRef(function (props, comRef) {
1630
1630
  }, []);
1631
1631
  var onCellClick = React.useCallback(function (e) {
1632
1632
  if (e.area === 'data') {
1633
- console.log("Pivot Cell Data", e);
1633
+ var pivotFields = [];
1634
+ e.columnFields.forEach(function (c, index) {
1635
+ var fieldValue = e.cell.columnPath[index];
1636
+ pivotFields.push(_extends({}, c.fieldData, {
1637
+ FieldValue: fieldValue
1638
+ }));
1639
+ });
1640
+ e.rowFields.forEach(function (r, index) {
1641
+ var fieldValue = e.cell.rowPath[index];
1642
+ pivotFields.push(_extends({}, r.fieldData, {
1643
+ FieldValue: fieldValue
1644
+ }));
1645
+ });
1646
+ props.customChartProps.onSelectDataPoint({
1647
+ MeasureFieldId: '',
1648
+ Widget: props.customChartProps.widget,
1649
+ MeasureCode: '',
1650
+ Formula: '',
1651
+ GroupById: '',
1652
+ PivotFields: pivotFields
1653
+ });
1634
1654
  }
1635
1655
  }, []);
1636
1656
 
@@ -1701,6 +1721,12 @@ var PivotTable = React.forwardRef(function (props, comRef) {
1701
1721
  },
1702
1722
  expanded: false,
1703
1723
  wordWrapEnabled: true,
1724
+ fieldData: {
1725
+ FieldId: field.FieldId,
1726
+ FieldType: field.FieldType ? field.FieldType : "Field",
1727
+ FieldValue: '',
1728
+ DateCode: field.DateCode
1729
+ },
1704
1730
  customizeText: function customizeText(cellInfo) {
1705
1731
  return getColumnNameByColumnId(field.PivotName, field.PivotCode, cellInfo.value);
1706
1732
  }