dirk-cfx-react 1.1.12 → 1.1.14
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/hooks/index.cjs +3 -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 +3 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/index.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -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) => {
|
|
@@ -2226,6 +2227,7 @@ function createScriptSettings(defaultValue) {
|
|
|
2226
2227
|
});
|
|
2227
2228
|
};
|
|
2228
2229
|
const updateScriptSettings = async (newSettings) => {
|
|
2230
|
+
console.log("Updating script settings:", JSON.stringify(newSettings, null, 2));
|
|
2229
2231
|
store.setState((prev) => ({ ...prev, ...newSettings }));
|
|
2230
2232
|
return await fetchNui("UPDATE_SCRIPT_SETTINGS", newSettings);
|
|
2231
2233
|
};
|