react-table-edit 1.2.7 → 1.2.8

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 CHANGED
@@ -2991,11 +2991,13 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
2991
2991
  setRefreshRow(false);
2992
2992
  }, 5);
2993
2993
  };
2994
- const handleDataChange = (row, col, indexRow) => {
2994
+ const handleDataChange = async (row, col, indexRow) => {
2995
2995
  if (rowChange) {
2996
- rowChange(row, indexRow, col.field);
2996
+ await rowChange(row, indexRow, col.field);
2997
+ changeDataSource(dataSource);
2998
+ } else {
2999
+ changeDataSource(dataSource);
2997
3000
  }
2998
- changeDataSource(dataSource);
2999
3001
  if (dataSourceChange) {
3000
3002
  dataSourceChange(dataSource);
3001
3003
  }
package/dist/index.mjs CHANGED
@@ -2962,11 +2962,13 @@ var TableEdit = forwardRef4((props, ref) => {
2962
2962
  setRefreshRow(false);
2963
2963
  }, 5);
2964
2964
  };
2965
- const handleDataChange = (row, col, indexRow) => {
2965
+ const handleDataChange = async (row, col, indexRow) => {
2966
2966
  if (rowChange) {
2967
- rowChange(row, indexRow, col.field);
2967
+ await rowChange(row, indexRow, col.field);
2968
+ changeDataSource(dataSource);
2969
+ } else {
2970
+ changeDataSource(dataSource);
2968
2971
  }
2969
- changeDataSource(dataSource);
2970
2972
  if (dataSourceChange) {
2971
2973
  dataSourceChange(dataSource);
2972
2974
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-table-edit",
3
- "version": "1.2.7",
3
+ "version": "1.2.8",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",