@lets-events/react 11.7.3 → 11.7.4

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @lets-events/react@11.7.3 build
2
+ > @lets-events/react@11.7.4 build
3
3
  > tsup src/index.tsx --format esm,cjs --dts --external react
4
4
 
5
5
  CLI Building entry: src/index.tsx
@@ -9,10 +9,10 @@
9
9
  ESM Build start
10
10
  CJS Build start
11
11
  DTS Build start
12
- CJS dist\index.js 332.14 KB
13
- CJS ⚡️ Build success in 908ms
14
- ESM dist\index.mjs 320.00 KB
15
- ESM ⚡️ Build success in 909ms
16
- DTS ⚡️ Build success in 4528ms
12
+ ESM dist\index.mjs 320.05 KB
13
+ ESM ⚡️ Build success in 310ms
14
+ CJS dist\index.js 332.18 KB
15
+ CJS ⚡️ Build success in 310ms
16
+ DTS ⚡️ Build success in 4234ms
17
17
  DTS dist\index.d.mts 383.65 KB
18
18
  DTS dist\index.d.ts 383.65 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @lets-events/react
2
2
 
3
+ ## 11.7.4
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: add validate null fallback to textformfield
8
+
3
9
  ## 11.7.3
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -9846,7 +9846,8 @@ var TextFormField = (_a) => {
9846
9846
  const handleValidate = (0, import_react17.useCallback)(
9847
9847
  (value) => {
9848
9848
  var _a2;
9849
- if (!required && value.trim() === "") return true;
9849
+ if (value === void 0 || value === null || !required && value.trim() === "")
9850
+ return true;
9850
9851
  return (_a2 = validate == null ? void 0 : validate(value)) != null ? _a2 : true;
9851
9852
  },
9852
9853
  [validate, required]
package/dist/index.mjs CHANGED
@@ -9749,7 +9749,8 @@ var TextFormField = (_a) => {
9749
9749
  const handleValidate = useCallback3(
9750
9750
  (value) => {
9751
9751
  var _a2;
9752
- if (!required && value.trim() === "") return true;
9752
+ if (value === void 0 || value === null || !required && value.trim() === "")
9753
+ return true;
9753
9754
  return (_a2 = validate == null ? void 0 : validate(value)) != null ? _a2 : true;
9754
9755
  },
9755
9756
  [validate, required]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lets-events/react",
3
- "version": "11.7.3",
3
+ "version": "11.7.4",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -39,8 +39,13 @@ export const TextFormField = ({
39
39
  ...inputProps
40
40
  }: TextFormFieldProps) => {
41
41
  const handleValidate = useCallback(
42
- (value: string) => {
43
- if (!required && value.trim() === "") return true;
42
+ (value?: string) => {
43
+ if (
44
+ value === undefined ||
45
+ value === null ||
46
+ (!required && value.trim() === "")
47
+ )
48
+ return true;
44
49
  return validate?.(value) ?? true;
45
50
  },
46
51
  [validate, required]