react-table-edit 1.2.51 → 1.2.52

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
@@ -2904,9 +2904,7 @@ var DateInput = (props) => {
2904
2904
  className,
2905
2905
  selected: value instanceof Date ? value : null,
2906
2906
  onChange: (date) => {
2907
- if (onChange) {
2908
- onChange(date);
2909
- }
2907
+ if (onChange) onChange(date);
2910
2908
  },
2911
2909
  dateFormat,
2912
2910
  locale: "vi",
@@ -2921,17 +2919,11 @@ var DateInput = (props) => {
2921
2919
  setOpen(!open);
2922
2920
  setTimeout(() => {
2923
2921
  const element = document.getElementById(id ?? "");
2924
- if (element) {
2925
- element.focus();
2926
- }
2922
+ if (element) element.focus();
2927
2923
  }, 100);
2928
- } else {
2929
- if (onKeyDown && !open) {
2930
- const rs = onKeyDown(e);
2931
- if (rs) {
2932
- setOpen(false);
2933
- }
2934
- }
2924
+ } else if (onKeyDown && !open) {
2925
+ const result = onKeyDown(e);
2926
+ if (result) setOpen(false);
2935
2927
  }
2936
2928
  }
2937
2929
  }
package/dist/index.mjs CHANGED
@@ -2874,9 +2874,7 @@ var DateInput = (props) => {
2874
2874
  className,
2875
2875
  selected: value instanceof Date ? value : null,
2876
2876
  onChange: (date) => {
2877
- if (onChange) {
2878
- onChange(date);
2879
- }
2877
+ if (onChange) onChange(date);
2880
2878
  },
2881
2879
  dateFormat,
2882
2880
  locale: "vi",
@@ -2891,17 +2889,11 @@ var DateInput = (props) => {
2891
2889
  setOpen(!open);
2892
2890
  setTimeout(() => {
2893
2891
  const element = document.getElementById(id ?? "");
2894
- if (element) {
2895
- element.focus();
2896
- }
2892
+ if (element) element.focus();
2897
2893
  }, 100);
2898
- } else {
2899
- if (onKeyDown && !open) {
2900
- const rs = onKeyDown(e);
2901
- if (rs) {
2902
- setOpen(false);
2903
- }
2904
- }
2894
+ } else if (onKeyDown && !open) {
2895
+ const result = onKeyDown(e);
2896
+ if (result) setOpen(false);
2905
2897
  }
2906
2898
  }
2907
2899
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-table-edit",
3
- "version": "1.2.51",
3
+ "version": "1.2.52",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",
@@ -38,26 +38,24 @@
38
38
  "becoxy-icons": "1.8.1",
39
39
  "classnames": "2.3.1",
40
40
  "i18next": "^21.8.2",
41
+ "react-datepicker": "^7.5.0",
41
42
  "react-hook-form": "7.43.9",
42
43
  "react-hot-toast": "2.2.0",
43
44
  "react-i18next": "^11.16.9",
45
+ "react-input-mask": "^2.0.4",
44
46
  "react-number-format": "^5.3.3",
45
47
  "react-resizable": "^3.0.5",
46
48
  "react-router-dom": "^6.3.0",
47
49
  "reactstrap": "9.0.1",
48
50
  "sweetalert2": "^11.4.14",
49
51
  "sweetalert2-react-content": "^5.0.0",
50
- "yup": "^0.32.11",
51
- "react-datepicker": "^7.3.0",
52
- "react-input-mask": "^2.0.4"
52
+ "yup": "^0.32.11"
53
53
  },
54
54
  "peerDependencies": {
55
55
  "react": ">=16.8.6 <19.0.0",
56
56
  "react-dom": ">=16.8.6 <19.0.0"
57
57
  },
58
58
  "devDependencies": {
59
- "@types/react-datepicker": "^6.2.0",
60
- "@types/react-input-mask": "^3.0.6",
61
59
  "tsup": "^8.0.2",
62
60
  "typescript": "^5.6.3"
63
61
  },