ods-component-lib 1.17.9 → 1.17.11
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 +8 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +9 -2
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState, useRef } from 'react';
|
|
1
|
+
import React, { useState, useRef, useEffect } from 'react';
|
|
2
2
|
import { AutoComplete, Button, Dropdown, Calendar, Card as Card$1, Checkbox, DatePicker, Divider, Input, Form, Image, InputNumber, List, Modal, notification, Radio, Rate, Select, Spin, Switch, Tabs, Table, Tag, Timeline, TimePicker, Typography } from 'antd';
|
|
3
3
|
import styled, { ThemeProvider } from 'styled-components';
|
|
4
4
|
import Card from 'antd/es/card/Card';
|
|
@@ -1210,6 +1210,14 @@ var customizeBooleanColumnRender = function customizeBooleanColumnRender(e) {
|
|
|
1210
1210
|
};
|
|
1211
1211
|
function OdsDataGrid(props) {
|
|
1212
1212
|
var dataGridRef = useRef(null);
|
|
1213
|
+
var clearSelection = function clearSelection() {
|
|
1214
|
+
if (dataGridRef.current) {
|
|
1215
|
+
dataGridRef.current.instance.clearSelection();
|
|
1216
|
+
}
|
|
1217
|
+
};
|
|
1218
|
+
useEffect(function () {
|
|
1219
|
+
clearSelection();
|
|
1220
|
+
}, []);
|
|
1213
1221
|
return grid(props, dataGridRef);
|
|
1214
1222
|
}
|
|
1215
1223
|
function grid(props, dataGridRef) {
|
|
@@ -1228,7 +1236,6 @@ function grid(props, dataGridRef) {
|
|
|
1228
1236
|
};
|
|
1229
1237
|
var fileName = props.exportFileName ? props.exportFileName + moment().format("YYYYMMDD") : "DatagridExportFile" + moment().format("YYYYMMDD");
|
|
1230
1238
|
var onExporting = function onExporting(e) {
|
|
1231
|
-
debugger;
|
|
1232
1239
|
if (e.format === 'xlsx') {
|
|
1233
1240
|
var workbook = new Workbook();
|
|
1234
1241
|
exportDataGrid({
|