ods-component-lib 1.18.134 → 1.18.136

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.
package/dist/index.js CHANGED
@@ -33528,6 +33528,9 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
33528
33528
  var _useState11 = React.useState(0),
33529
33529
  scrollPosition = _useState11[0],
33530
33530
  setScrollPosition = _useState11[1];
33531
+ var _useState12 = React.useState(false),
33532
+ filteredButtonCheck = _useState12[0],
33533
+ setFilteredButtonCheck = _useState12[1];
33531
33534
  var _useStyles = useStyles(),
33532
33535
  gridStyle = _useStyles.styles;
33533
33536
  React.useEffect(function () {
@@ -33826,7 +33829,7 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
33826
33829
  }
33827
33830
  }, []);
33828
33831
  var renderTotal = React.useCallback(function () {
33829
- var _props$customSummary3;
33832
+ var _props$customSummary;
33830
33833
  var result = "";
33831
33834
  var totalloaded = 0;
33832
33835
  if (data.length < 50 || !props.isServerSide || constants.loadedPageCount == constants.totalPageCount) {
@@ -33834,18 +33837,13 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
33834
33837
  } else {
33835
33838
  totalloaded = constants.loadedPageCount * props.pageSize;
33836
33839
  }
33837
- if (props.isServerSide) {
33838
- var _props$customSummary, _props$customSummary2;
33839
- result = constants.totalRecordCount > 0 ? totalloaded + " " + ((_props$customSummary = props.customSummary) === null || _props$customSummary === void 0 ? void 0 : _props$customSummary.summaryLoadedDataLabel) + ("- " + constants.totalRecordCount) + ((_props$customSummary2 = props.customSummary) === null || _props$customSummary2 === void 0 ? void 0 : _props$customSummary2.summaryTotalDataLabel) : "";
33840
- result = concatFilteredLabel(result, totalloaded, filteredRowCount, filterApplied.current, props);
33841
- }
33842
- if (((_props$customSummary3 = props.customSummary) === null || _props$customSummary3 === void 0 ? void 0 : _props$customSummary3.summaryTotalCount) !== undefined && !props.isServerSide) {
33840
+ if (((_props$customSummary = props.customSummary) === null || _props$customSummary === void 0 ? void 0 : _props$customSummary.summaryTotalCount) !== undefined && !props.isServerSide) {
33843
33841
  result = props.customSummary.summaryTotalDataLabel + " : " + props.customSummary.summaryTotalCount;
33844
33842
  result = concatFilteredLabel(result, totalloaded, filteredRowCount, filterApplied.current, props);
33845
33843
  }
33846
33844
  if (constants.totalPageCount > 1) {
33847
- var _props$customSummary4;
33848
- result = result + " - " + ((_props$customSummary4 = props.customSummary) === null || _props$customSummary4 === void 0 ? void 0 : _props$customSummary4.summaryTotalPageCountLabel) + " " + constants.loadedPageCount + " / " + constants.totalPageCount;
33845
+ var _props$customSummary2;
33846
+ result = result + " - " + ((_props$customSummary2 = props.customSummary) === null || _props$customSummary2 === void 0 ? void 0 : _props$customSummary2.summaryTotalPageCountLabel) + " " + constants.loadedPageCount + " / " + constants.totalPageCount;
33849
33847
  }
33850
33848
  return result;
33851
33849
  }, [data, filteredRowCount, constants.loadedPageCount, props.pageSize, constants.totalRecordCount, filterApplied.current]);
@@ -33954,10 +33952,16 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
33954
33952
  }, 200);
33955
33953
  run(e);
33956
33954
  };
33955
+ var onCustomOptionChanged = function onCustomOptionChanged(e) {
33956
+ if (e.name === 'filterPanel') {
33957
+ var filteredCheckedValue = e.value;
33958
+ setFilteredButtonCheck(filteredCheckedValue);
33959
+ }
33960
+ };
33957
33961
  var handleContentReady = function handleContentReady(e) {
33958
33962
  var dataGridInstance = e.component;
33959
33963
  var filteredDataCount = dataGridInstance.totalCount();
33960
- if (filterApplied.current && filteredDataCount > 0) {
33964
+ if (filterApplied.current && filteredButtonCheck && filteredDataCount > 0) {
33961
33965
  setFilteredRowCount(filteredDataCount);
33962
33966
  } else {
33963
33967
  setFilteredRowCount(0);
@@ -34199,7 +34203,7 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
34199
34203
  onCellClick: onCustomCellClick,
34200
34204
  onCellHoverChanged: onCustomCellHoverChanged,
34201
34205
  onCellPrepared: onCustomCellPrepared,
34202
- onOptionChanged: props.onOptionChanged,
34206
+ onOptionChanged: props.onOptionChanged || onCustomOptionChanged,
34203
34207
  onToolbarPreparing: props.onToolbarPreparing || onToolbarPreparing
34204
34208
  }, gridColumns.map(function (col) {
34205
34209
  return React__default.createElement(DataGrid.Column, Object.assign({