ods-component-lib 1.18.67 → 1.18.68
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
|
@@ -16854,16 +16854,16 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
16854
16854
|
var onExporting = useCallback(function (e) {
|
|
16855
16855
|
if (e.format === 'xlsx') {
|
|
16856
16856
|
var workbook = new Workbook();
|
|
16857
|
-
if (props.
|
|
16858
|
-
var
|
|
16857
|
+
if (props.filterData != null) {
|
|
16858
|
+
var newColumnFromFilterData = props.filterData.map(function (filterItem) {
|
|
16859
16859
|
return {
|
|
16860
|
-
dataField:
|
|
16861
|
-
caption:
|
|
16860
|
+
dataField: filterItem.key,
|
|
16861
|
+
caption: filterItem.key
|
|
16862
16862
|
};
|
|
16863
16863
|
});
|
|
16864
|
-
var
|
|
16864
|
+
var newColumns = [].concat(columns.current, newColumnFromFilterData);
|
|
16865
16865
|
e.component.beginUpdate();
|
|
16866
|
-
e.component.option("columns",
|
|
16866
|
+
e.component.option("columns", newColumns);
|
|
16867
16867
|
e.component.endUpdate();
|
|
16868
16868
|
}
|
|
16869
16869
|
exportDataGrid({
|
|
@@ -16886,8 +16886,8 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
16886
16886
|
excelCell.value = formattedDate;
|
|
16887
16887
|
}
|
|
16888
16888
|
}
|
|
16889
|
-
if (gridCell.rowType !== 'header' && props.
|
|
16890
|
-
var matchingItem = props.
|
|
16889
|
+
if (gridCell.rowType !== 'header' && props.filterData != null) {
|
|
16890
|
+
var matchingItem = props.filterData.find(function (item) {
|
|
16891
16891
|
return item.key === gridCell.column.dataField;
|
|
16892
16892
|
});
|
|
16893
16893
|
if (matchingItem) {
|
|
@@ -16912,7 +16912,7 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
16912
16912
|
doc.save(fileName + '.pdf');
|
|
16913
16913
|
});
|
|
16914
16914
|
}
|
|
16915
|
-
}, [fileName]);
|
|
16915
|
+
}, [fileName, props.filterData]);
|
|
16916
16916
|
var customLoad = useCallback(function () {
|
|
16917
16917
|
var state = JSON.parse(localStorage.getItem(props.exportFileName + "Storage"));
|
|
16918
16918
|
if (localStorage.getItem(props.exportFileName + "Storage")) {
|