ods-component-lib 1.18.140 → 1.18.143

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
@@ -33536,6 +33536,9 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
33536
33536
  var _useState12 = React.useState(true),
33537
33537
  filteredButtonCheck = _useState12[0],
33538
33538
  setFilteredButtonCheck = _useState12[1];
33539
+ var _useState13 = React.useState(false),
33540
+ searchPanelApplied = _useState13[0],
33541
+ setSearchPanelApplied = _useState13[1];
33539
33542
  var _useStyles = useStyles(),
33540
33543
  gridStyle = _useStyles.styles;
33541
33544
  React.useEffect(function () {
@@ -33586,32 +33589,6 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
33586
33589
  React.useEffect(function () {
33587
33590
  if (contentReady) checkSortingPropertyForInitilaize();
33588
33591
  }, [contentReady]);
33589
- React.useEffect(function () {
33590
- var cssRules = "\n .data-exists .dx-datagrid-borders > .dx-datagrid-filter-panel,\n .data-exists .dx-datagrid-borders > .dx-datagrid-headers {\n border-top: 1px solid rgba(0, 0, 0, 0.06);\n padding-right: 0px !important;\n }\n\n .data-exists .dx-datagrid-headers .dx-datagrid-content {\n margin-bottom: -1px;\n padding-right: 17px !important;\n }\n ";
33591
- var styleSheet = document.createElement("style");
33592
- styleSheet.type = "text/css";
33593
- styleSheet.innerText = cssRules;
33594
- document.head.appendChild(styleSheet);
33595
- var checkData = function checkData() {
33596
- if (gridRef.current) {
33597
- var _dataGridInstance = gridRef.current.instance;
33598
- var dataExists = data.length >= 15;
33599
- var gridElement = _dataGridInstance.element();
33600
- if (dataExists) {
33601
- gridElement.classList.add("data-exists");
33602
- } else {
33603
- gridElement.classList.remove("data-exists");
33604
- }
33605
- }
33606
- };
33607
- var dataGridInstance = gridRef.current.instance;
33608
- dataGridInstance.on("dataChanged", checkData);
33609
- checkData();
33610
- return function () {
33611
- document.head.removeChild(styleSheet);
33612
- dataGridInstance.off("dataChanged", checkData);
33613
- };
33614
- }, [data]);
33615
33592
  var onCustomSelectionChanged = React.useCallback(function (e) {
33616
33593
  if (props.onSelectionChanged) {
33617
33594
  props.onSelectionChanged(e);
@@ -33962,12 +33939,18 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
33962
33939
  var filteredCheckedValue = e.value;
33963
33940
  setFilteredButtonCheck(filteredCheckedValue);
33964
33941
  }
33942
+ if (e.name === 'searchPanel') {
33943
+ setSearchPanelApplied(true);
33944
+ }
33965
33945
  };
33966
33946
  var handleContentReady = function handleContentReady(e) {
33967
33947
  var dataGridInstance = e.component;
33968
33948
  var filteredDataCount = dataGridInstance.totalCount();
33969
33949
  if (filterApplied.current && filteredButtonCheck && filteredDataCount > 0) {
33970
33950
  setFilteredRowCount(filteredDataCount);
33951
+ } else if (searchPanelApplied && filteredDataCount > 0) {
33952
+ setFilteredRowCount(filteredDataCount);
33953
+ filterApplied.current = true;
33971
33954
  } else {
33972
33955
  setFilteredRowCount(0);
33973
33956
  }
@@ -34176,9 +34159,6 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
34176
34159
  columnResizingMode: (_props$columnResizing = props.columnResizingMode) != null ? _props$columnResizing : "widget",
34177
34160
  showRowLines: true,
34178
34161
  allowColumnReordering: true,
34179
- scrolling: {
34180
- useNative: true
34181
- },
34182
34162
  remoteOperations: false,
34183
34163
  paging: {
34184
34164
  enabled: false