Hi !
I was wondering if someone already managed to link the Kendo Form to a sort of generated code objects from an OAS file.
Based on research on the web, there are many ways to generated code from a OAS yaml file.
Since we are using Kendo React (without Typescript) and Axios for the API calls, I found two ways:
- open-api specs generator typescript-axios: The problem is that will result in a project mixing plain javascript and typescript;
- take advantage of the Kendo integration with redux: Use redux-toolkit => rtk-query code generation functionality to generate the files then configure it to use Axios. That solution would require lots of refactoring in the application. And, again, there would be a mix with Typescript.
I would be grateful if you could share ideas, solutions or past experiences concerning that subject.
Best regards
I would like to render a Field component outside the Form render function, is this possible? I would like to leverage the validator prop/logic that comes with the Field component.
const InputValidationWrapper = (fieldRenderProps) => {
const { validationMessage, visited, enabledAutoComplete, ...others } = fieldRenderProps;
const inputProps = enabledAutoComplete ? others : { ...others, autoComplete: "off" };
return (
<div className="pingora-val-i">
<Input {...inputProps} />
{visited && validationMessage && <Error>{validationMessage}</Error>}
</div>
);
};
const nameValidator = (value) => (!value ? 'Full Name is required' : '');
const App = () => {
return (
<div>
<Field
id={'fullName'}
name={'fullName'}
label={'Full Name'}
component={Input}
validator={nameValidator}
/>
</div>
);
};
Thanks
I'm looking for an example of how we would use a JSON object to dynamically generate a form. We have a number of products that users can select and depending on the product they select the input fields will be different, all of the configurations can be sent via a JSON object but i'm trying to understand how to use that to generate a unique for based on the config.
Are there any examples of this type of dynamic form?