dirk-cfx-react 1.1.11 → 1.1.13
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/components/index.cjs.map +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/hooks/index.cjs +2 -1
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.cts +3 -1
- package/dist/hooks/index.d.ts +3 -1
- package/dist/hooks/index.js +2 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/index.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/providers/index.cjs.map +1 -1
- package/dist/providers/index.js.map +1 -1
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -229,7 +229,7 @@ async function fetchNui(eventName, data, mockData) {
|
|
|
229
229
|
},
|
|
230
230
|
body: JSON.stringify(data)
|
|
231
231
|
};
|
|
232
|
-
if (isEnvBrowser() && mockData) return mockData;
|
|
232
|
+
if (isEnvBrowser() && mockData !== void 0) return mockData;
|
|
233
233
|
if (isEnvBrowser() && mockData === void 0) {
|
|
234
234
|
console.warn(
|
|
235
235
|
`[fetchNui] Called fetchNui for event "${eventName}" in browser environment without mockData. Returning empty object.`
|
|
@@ -2042,7 +2042,7 @@ function createFormStore(initialValues, validationRules, onSubmit) {
|
|
|
2042
2042
|
set({ changedFields: [], changedCount: 0 });
|
|
2043
2043
|
},
|
|
2044
2044
|
setInitialValues: (newInitialValues) => set({ initialValues: newInitialValues }),
|
|
2045
|
-
setValue: (path, value) => {
|
|
2045
|
+
setValue: (path, value, options) => {
|
|
2046
2046
|
const currentValues = get().values;
|
|
2047
2047
|
const newValues = setNested(currentValues, path, value);
|
|
2048
2048
|
const oldValue = getNested(get().initialValues, path);
|
|
@@ -2057,6 +2057,7 @@ function createFormStore(initialValues, validationRules, onSubmit) {
|
|
|
2057
2057
|
changedFields: Array.from(changed),
|
|
2058
2058
|
changedCount: changed.size
|
|
2059
2059
|
});
|
|
2060
|
+
if (options?.validate == false) return;
|
|
2060
2061
|
const rule = flatRules[path];
|
|
2061
2062
|
if (!rule) return;
|
|
2062
2063
|
Promise.resolve(runRule(rule, value, newValues)).then((error2) => {
|