@steroidsjs/core 3.0.0-beta.13 → 3.0.0-beta.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/package.json
CHANGED
|
@@ -131,8 +131,10 @@ function fieldWrapper(componentId, Component, optionsConfig) {
|
|
|
131
131
|
}
|
|
132
132
|
// Resolve layout
|
|
133
133
|
var layout = (0, react_1.useMemo)(function () { return (0, form_1.mergeLayoutProp)(context.layout, props.layout); }, [context.layout, props.layout]);
|
|
134
|
+
var uniqueId = (0, hooks_1.useUniqueId)('input');
|
|
135
|
+
var inputId = props.id || uniqueId;
|
|
134
136
|
if (layout !== null) {
|
|
135
|
-
return components.ui.renderView(FieldLayout_1["default"], __assign(__assign({}, attributesProps), { layout: layout, size: props.size || context.size || null, required: (0, has_1["default"])(props, 'required') ? props.required : metaProps.required, label: options.label === false ? null : ((0, has_1["default"])(props, 'label') ? props.label : metaProps.label), hint: (0, has_1["default"])(props, 'hint') ? props.hint : metaProps.hint, errors: props.errors, children: (React.createElement(Component.DynamicField, __assign({}, props))) }));
|
|
137
|
+
return components.ui.renderView(FieldLayout_1["default"], __assign(__assign({}, attributesProps), { layout: layout, size: props.size || context.size || null, required: (0, has_1["default"])(props, 'required') ? props.required : metaProps.required, label: options.label === false ? null : ((0, has_1["default"])(props, 'label') ? props.label : metaProps.label), hint: (0, has_1["default"])(props, 'hint') ? props.hint : metaProps.hint, errors: props.errors, id: inputId, children: (React.createElement(Component.DynamicField, __assign({}, props, { id: inputId }))) }));
|
|
136
138
|
}
|
|
137
139
|
return components.ui.renderView(Component.DynamicField, props);
|
|
138
140
|
};
|