@bento-core/paginated-table 1.0.1-ctdc.4 → 1.0.1-ctdc.5

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.
@@ -24,6 +24,7 @@ const PaginatedTable = _ref => {
24
24
  themeConfig = {},
25
25
  totalRowCount = 0,
26
26
  initState,
27
+ checkedItemReset,
27
28
  activeTab = true,
28
29
  server = true,
29
30
  tblRows = [],
@@ -54,6 +55,11 @@ const PaginatedTable = _ref => {
54
55
  dispatch
55
56
  }));
56
57
  }, [table]);
58
+ (0, _react.useEffect)(() => {
59
+ if (checkedItemReset) {
60
+ dispatch((0, _Actions.onRowSeclect)([]));
61
+ }
62
+ }, [checkedItemReset]);
57
63
 
58
64
  /**
59
65
  * update state to props change
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bento-core/paginated-table",
3
- "version": "1.0.1-ctdc.4",
3
+ "version": "1.0.1-ctdc.5",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -18,6 +18,7 @@ const PaginatedTable = ({
18
18
  themeConfig = {},
19
19
  totalRowCount = 0,
20
20
  initState,
21
+ checkedItemReset,
21
22
  activeTab = true,
22
23
  server = true,
23
24
  tblRows = [],
@@ -46,6 +47,12 @@ const PaginatedTable = ({
46
47
  setContext({ ...table, dispatch });
47
48
  }, [table]);
48
49
 
50
+ useEffect(() => {
51
+ if (checkedItemReset) {
52
+ dispatch(onRowSeclect([]));
53
+ }
54
+ }, [checkedItemReset]);
55
+
49
56
  /**
50
57
  * update state to props change
51
58
  */