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.
@@ -33523,6 +33523,9 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
33523
33523
  var _useState11 = useState(0),
33524
33524
  scrollPosition = _useState11[0],
33525
33525
  setScrollPosition = _useState11[1];
33526
+ var _useState12 = useState(false),
33527
+ filteredButtonCheck = _useState12[0],
33528
+ setFilteredButtonCheck = _useState12[1];
33526
33529
  var _useStyles = useStyles(),
33527
33530
  gridStyle = _useStyles.styles;
33528
33531
  useEffect(function () {
@@ -33821,7 +33824,7 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
33821
33824
  }
33822
33825
  }, []);
33823
33826
  var renderTotal = useCallback(function () {
33824
- var _props$customSummary3;
33827
+ var _props$customSummary;
33825
33828
  var result = "";
33826
33829
  var totalloaded = 0;
33827
33830
  if (data.length < 50 || !props.isServerSide || constants.loadedPageCount == constants.totalPageCount) {
@@ -33829,18 +33832,13 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
33829
33832
  } else {
33830
33833
  totalloaded = constants.loadedPageCount * props.pageSize;
33831
33834
  }
33832
- if (props.isServerSide) {
33833
- var _props$customSummary, _props$customSummary2;
33834
- 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) : "";
33835
- result = concatFilteredLabel(result, totalloaded, filteredRowCount, filterApplied.current, props);
33836
- }
33837
- if (((_props$customSummary3 = props.customSummary) === null || _props$customSummary3 === void 0 ? void 0 : _props$customSummary3.summaryTotalCount) !== undefined && !props.isServerSide) {
33835
+ if (((_props$customSummary = props.customSummary) === null || _props$customSummary === void 0 ? void 0 : _props$customSummary.summaryTotalCount) !== undefined && !props.isServerSide) {
33838
33836
  result = props.customSummary.summaryTotalDataLabel + " : " + props.customSummary.summaryTotalCount;
33839
33837
  result = concatFilteredLabel(result, totalloaded, filteredRowCount, filterApplied.current, props);
33840
33838
  }
33841
33839
  if (constants.totalPageCount > 1) {
33842
- var _props$customSummary4;
33843
- result = result + " - " + ((_props$customSummary4 = props.customSummary) === null || _props$customSummary4 === void 0 ? void 0 : _props$customSummary4.summaryTotalPageCountLabel) + " " + constants.loadedPageCount + " / " + constants.totalPageCount;
33840
+ var _props$customSummary2;
33841
+ result = result + " - " + ((_props$customSummary2 = props.customSummary) === null || _props$customSummary2 === void 0 ? void 0 : _props$customSummary2.summaryTotalPageCountLabel) + " " + constants.loadedPageCount + " / " + constants.totalPageCount;
33844
33842
  }
33845
33843
  return result;
33846
33844
  }, [data, filteredRowCount, constants.loadedPageCount, props.pageSize, constants.totalRecordCount, filterApplied.current]);
@@ -33949,10 +33947,16 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
33949
33947
  }, 200);
33950
33948
  run(e);
33951
33949
  };
33950
+ var onCustomOptionChanged = function onCustomOptionChanged(e) {
33951
+ if (e.name === 'filterPanel') {
33952
+ var filteredCheckedValue = e.value;
33953
+ setFilteredButtonCheck(filteredCheckedValue);
33954
+ }
33955
+ };
33952
33956
  var handleContentReady = function handleContentReady(e) {
33953
33957
  var dataGridInstance = e.component;
33954
33958
  var filteredDataCount = dataGridInstance.totalCount();
33955
- if (filterApplied.current && filteredDataCount > 0) {
33959
+ if (filterApplied.current && filteredButtonCheck && filteredDataCount > 0) {
33956
33960
  setFilteredRowCount(filteredDataCount);
33957
33961
  } else {
33958
33962
  setFilteredRowCount(0);
@@ -34194,7 +34198,7 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
34194
34198
  onCellClick: onCustomCellClick,
34195
34199
  onCellHoverChanged: onCustomCellHoverChanged,
34196
34200
  onCellPrepared: onCustomCellPrepared,
34197
- onOptionChanged: props.onOptionChanged,
34201
+ onOptionChanged: props.onOptionChanged || onCustomOptionChanged,
34198
34202
  onToolbarPreparing: props.onToolbarPreparing || onToolbarPreparing
34199
34203
  }, gridColumns.map(function (col) {
34200
34204
  return React.createElement(Column, Object.assign({