@nolwenture/formik-jsonschema-form 0.23.2 → 0.23.3
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/README.md +1 -0
- package/dist/Form.js +2 -2
- package/dist/Form.stories.d.ts +1 -0
- package/dist/Form.stories.js +7 -0
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1009,5 +1009,6 @@ Wildcard `"*"` and `hidden fields` cannot be combined.
|
|
|
1009
1009
|
components={components} // Override form components (e.g. wrappers) with custom ones
|
|
1010
1010
|
formContext={formContext} // Form context
|
|
1011
1011
|
useItemsAsAdditionalItems={true} // Allow "items" to be used as "additionalItems" in array fields that are missing "additionalItems", false by default
|
|
1012
|
+
hideSubmit={true} // hides submit-button of the form
|
|
1012
1013
|
/>
|
|
1013
1014
|
```
|
package/dist/Form.js
CHANGED
|
@@ -30,7 +30,7 @@ export const Form = (props) => {
|
|
|
30
30
|
"hideUnmarkedAdditionalProperties",
|
|
31
31
|
]);
|
|
32
32
|
const { isSubmitting } = useFormikContext();
|
|
33
|
-
const { schema, uiSchema = {}, className, children, fields = {}, templates = {}, components = {}, formContext = {}, useItemsAsAdditionalItems = false, hideUnmarkedAdditionalProperties = false, } = props;
|
|
33
|
+
const { schema, uiSchema = {}, className, children, fields = {}, templates = {}, components = {}, formContext = {}, useItemsAsAdditionalItems = false, hideUnmarkedAdditionalProperties = false, hideSubmit = false, } = props;
|
|
34
34
|
const schemaDefinitions = schema.definitions;
|
|
35
35
|
const uiSchemaDefinitions = uiSchema.definitions;
|
|
36
36
|
const registry = {
|
|
@@ -45,5 +45,5 @@ export const Form = (props) => {
|
|
|
45
45
|
};
|
|
46
46
|
const { Form: FormEl, FormButton, FormButtonWrapper } = registry.components;
|
|
47
47
|
const SchemaField = registry.fields.SchemaField;
|
|
48
|
-
return (_jsx(FormRegistry.Provider, { value: registry, children: _jsxs(FormEl, { className: className, children: [_jsx(SchemaField, { name: "", schema: schema, uiSchema: uiSchema }), children ? (children) : (_jsx(FormButtonWrapper, { children: _jsx(FormButton, { type: "submit", disabled: isSubmitting, children: "Send" }) }))] }) }));
|
|
48
|
+
return (_jsx(FormRegistry.Provider, { value: registry, children: _jsxs(FormEl, { className: className, children: [_jsx(SchemaField, { name: "", schema: schema, uiSchema: uiSchema }), children ? (children) : (_jsx(FormButtonWrapper, { children: !hideSubmit && (_jsx(FormButton, { type: "submit", disabled: isSubmitting, children: "Send" })) }))] }) }));
|
|
49
49
|
};
|
package/dist/Form.stories.d.ts
CHANGED
package/dist/Form.stories.js
CHANGED
package/dist/types.d.ts
CHANGED