ods-component-lib 1.17.8 → 1.17.9
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 +15 -3
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +15 -3
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1209,9 +1209,10 @@ var customizeBooleanColumnRender = function customizeBooleanColumnRender(e) {
|
|
|
1209
1209
|
return e.value;
|
|
1210
1210
|
};
|
|
1211
1211
|
function OdsDataGrid(props) {
|
|
1212
|
-
|
|
1212
|
+
var dataGridRef = useRef(null);
|
|
1213
|
+
return grid(props, dataGridRef);
|
|
1213
1214
|
}
|
|
1214
|
-
function grid(props) {
|
|
1215
|
+
function grid(props, dataGridRef) {
|
|
1215
1216
|
var _ref;
|
|
1216
1217
|
var headerCellRender = function headerCellRender(colProperties) {
|
|
1217
1218
|
return React.createElement("th", {
|
|
@@ -1252,6 +1253,11 @@ function grid(props) {
|
|
|
1252
1253
|
});
|
|
1253
1254
|
}
|
|
1254
1255
|
};
|
|
1256
|
+
var clearAllFilters = function clearAllFilters() {
|
|
1257
|
+
if (dataGridRef.current) {
|
|
1258
|
+
dataGridRef.current.instance.clearFilter();
|
|
1259
|
+
}
|
|
1260
|
+
};
|
|
1255
1261
|
return React.createElement(React.Fragment, null, React.createElement("div", {
|
|
1256
1262
|
className: "odsDatagrid",
|
|
1257
1263
|
style: {
|
|
@@ -1273,7 +1279,8 @@ function grid(props) {
|
|
|
1273
1279
|
columnAutoWidth: false,
|
|
1274
1280
|
onEditCanceling: props.onEditCanceling,
|
|
1275
1281
|
onExporting: onExporting,
|
|
1276
|
-
height: (_ref = props.height !== undefined) != null ? _ref : props.height
|
|
1282
|
+
height: (_ref = props.height !== undefined) != null ? _ref : props.height,
|
|
1283
|
+
ref: dataGridRef
|
|
1277
1284
|
}, React.createElement(Paging, {
|
|
1278
1285
|
enabled: true,
|
|
1279
1286
|
defaultPageSize: props.pageSize
|
|
@@ -1393,6 +1400,11 @@ function grid(props) {
|
|
|
1393
1400
|
type: "primary",
|
|
1394
1401
|
onClick: props.onAddButton
|
|
1395
1402
|
}, "Add New")), React.createElement(Item$1, {
|
|
1403
|
+
location: "after"
|
|
1404
|
+
}, React.createElement(OdsButton, {
|
|
1405
|
+
type: "default",
|
|
1406
|
+
onClick: clearAllFilters
|
|
1407
|
+
}, "Clear Filters")), React.createElement(Item$1, {
|
|
1396
1408
|
name: "searchPanel"
|
|
1397
1409
|
}), React.createElement(Item$1, {
|
|
1398
1410
|
name: "columnChooserButton"
|