ods-component-lib 1.18.72 → 1.18.74
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.modern.js
CHANGED
|
@@ -16677,6 +16677,7 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
16677
16677
|
};
|
|
16678
16678
|
colItem.headerCellRender = headerCellRenderr;
|
|
16679
16679
|
}
|
|
16680
|
+
if (props.isServerSide) colItem.calculateSortValue = String("dummyFieldForPreventClientSideSorting");
|
|
16680
16681
|
return colItem;
|
|
16681
16682
|
});
|
|
16682
16683
|
columns.current = newColumns;
|
|
@@ -16697,6 +16698,32 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
16697
16698
|
useEffect(function () {
|
|
16698
16699
|
if (contentReady) checkSortingPropertyForInitilaize();
|
|
16699
16700
|
}, [contentReady]);
|
|
16701
|
+
useEffect(function () {
|
|
16702
|
+
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 ";
|
|
16703
|
+
var styleSheet = document.createElement('style');
|
|
16704
|
+
styleSheet.type = 'text/css';
|
|
16705
|
+
styleSheet.innerText = cssRules;
|
|
16706
|
+
document.head.appendChild(styleSheet);
|
|
16707
|
+
var checkData = function checkData() {
|
|
16708
|
+
if (gridRef.current) {
|
|
16709
|
+
var _dataGridInstance = gridRef.current.instance;
|
|
16710
|
+
var dataExists = data.length > 0;
|
|
16711
|
+
var gridElement = _dataGridInstance.element();
|
|
16712
|
+
if (dataExists) {
|
|
16713
|
+
gridElement.classList.add('data-exists');
|
|
16714
|
+
} else {
|
|
16715
|
+
gridElement.classList.remove('data-exists');
|
|
16716
|
+
}
|
|
16717
|
+
}
|
|
16718
|
+
};
|
|
16719
|
+
var dataGridInstance = gridRef.current.instance;
|
|
16720
|
+
dataGridInstance.on('dataChanged', checkData);
|
|
16721
|
+
checkData();
|
|
16722
|
+
return function () {
|
|
16723
|
+
document.head.removeChild(styleSheet);
|
|
16724
|
+
dataGridInstance.off('dataChanged', checkData);
|
|
16725
|
+
};
|
|
16726
|
+
}, [data]);
|
|
16700
16727
|
var checkSortingPropertyForInitilaize = function checkSortingPropertyForInitilaize() {
|
|
16701
16728
|
var onOptionChanged = props.onOptionChanged;
|
|
16702
16729
|
if (onOptionChanged) {
|