ods-component-lib 1.18.73 → 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
|
@@ -16698,6 +16698,32 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
16698
16698
|
useEffect(function () {
|
|
16699
16699
|
if (contentReady) checkSortingPropertyForInitilaize();
|
|
16700
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]);
|
|
16701
16727
|
var checkSortingPropertyForInitilaize = function checkSortingPropertyForInitilaize() {
|
|
16702
16728
|
var onOptionChanged = props.onOptionChanged;
|
|
16703
16729
|
if (onOptionChanged) {
|