Telerik Forums
KendoReact Forum
1 answer
70 views

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

Konstantin Dikov
Telerik team
 answered on 06 Sep 2023
1 answer
191 views

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

Filip
Telerik team
 answered on 05 Aug 2022
1 answer
115 views

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?

Konstantin Dikov
Telerik team
 answered on 10 Mar 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?