@bolttech/form-engine 3.0.2 → 3.0.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.
- package/index.esm.js +10 -6
- package/package.json +2 -2
package/index.esm.js
CHANGED
|
@@ -3233,6 +3233,9 @@ const FieldWrapper = ({
|
|
|
3233
3233
|
formGroupInstance,
|
|
3234
3234
|
debugMode
|
|
3235
3235
|
} = useMemo(() => context ? context : localContext, [context, localContext]);
|
|
3236
|
+
/**
|
|
3237
|
+
* retrieves the field instance when it's mounted
|
|
3238
|
+
*/
|
|
3236
3239
|
const fieldInstance = useMemo(() => {
|
|
3237
3240
|
var _a;
|
|
3238
3241
|
return (_a = formGroupInstance.getForm({
|
|
@@ -3245,12 +3248,13 @@ const FieldWrapper = ({
|
|
|
3245
3248
|
* props with templates stripped until the field ins't ready on the instance
|
|
3246
3249
|
*/
|
|
3247
3250
|
const filteredProps = useMemo(() => {
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3251
|
+
return FormField.filterProps(props);
|
|
3252
|
+
}, []);
|
|
3253
|
+
/**
|
|
3254
|
+
* sends props changed on the adapter for comparison to effectively change props for the instance
|
|
3255
|
+
*/
|
|
3256
|
+
useEffect(() => {
|
|
3257
|
+
if (fieldInstance && props) fieldInstance.adapterProps = props;
|
|
3254
3258
|
}, [props]);
|
|
3255
3259
|
const [valueState, setValueState] = useState((fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.stateValue) || {
|
|
3256
3260
|
[((_b = fieldMapper === null || fieldMapper === void 0 ? void 0 : fieldMapper.events) === null || _b === void 0 ? void 0 : _b.setValue) || 'value']: ''
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bolttech/form-engine",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.4",
|
|
4
4
|
"description": "A react adapter for bolttech form engine",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@bolttech/form-engine-core": "^1.0.
|
|
6
|
+
"@bolttech/form-engine-core": "^1.0.4"
|
|
7
7
|
},
|
|
8
8
|
"peerDependencies": {
|
|
9
9
|
"react": "19.1.1",
|