jucian0 / createform Goto Github PK
View Code? Open in Web Editor NEWThe ReactJS form library
Home Page: https://react-createform.vercel.app
License: MIT License
The ReactJS form library
Home Page: https://react-createform.vercel.app
License: MIT License
I'm using a multiselect by react-select library. How can I save the options in my object?
{...register('skills.programmingLanguages')}
is not working
import { createForm } from '@createform/react';
export const usePersonForm = createForm({
initialValues: {
firstName: '',
lastName: '',
jobTitle: '',
skills: {
programmingLanguages: [],
frameworks: [],
specializations: [],
languages: [],
otherSkills: [],
},
},
});
<CreatableSelect
isClearable
id="programmingLanguages"
closeMenuOnSelect={false}
components={animatedComponents}
isMulti
options={programmingLanguages}
// {...register('skills.programmingLanguages')}
/>
and of course it's not working reset function
<button type="reset" className="base-form__button base-form__button-violet">
Reset
</button>
How can I solve this problem?
I read the doc (https://www.useform.org/using-your-form/custom-components) but it didn't help me
Thank you
The discord link at the footer of the website is either invalid or expired. Please update the discord link so that users can join. ๐
Thank You.
Describe the bug
Using setFieldValue on a custom component(Material ui TextField component/) is throwing this error.
Uncaught TypeError: Cannot read property 'type' of null at setRefValue (use-form.esm.js?c5f1:1013) at setFieldValue (use-form.esm.js?c5f1:1211) at onChange (Description.tsx?07db:64) at handleChange (InputBase.js?ac10:359) at HTMLUnknownElement.callCallback (react-dom.development.js?0507:3945) at Object.invokeGuardedCallbackDev (react-dom.development.js?0507:3994) at invokeGuardedCallback (react-dom.development.js?0507:4056) at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js?0507:4070) at executeDispatch (react-dom.development.js?0507:8243) at processDispatchQueueItemsInOrder (react-dom.development.js?0507:8275) at processDispatchQueue (react-dom.development.js?0507:8288) at dispatchEventsForPlugins (react-dom.development.js?0507:8299) at eval (react-dom.development.js?0507:8508) at batchedEventUpdates$1 (react-dom.development.js?0507:22396) at batchedEventUpdates (react-dom.development.js?0507:3745) at dispatchEventForPluginEventSystem (react-dom.development.js?0507:8507) at attemptToDispatchEvent (react-dom.development.js?0507:6005) at dispatchEvent (react-dom.development.js?0507:5924) at unstable_runWithPriority (scheduler.development.js?d068:468) at runWithPriority$1 (react-dom.development.js?0507:11276) at discreteUpdates$1 (react-dom.development.js?0507:22413) at discreteUpdates (react-dom.development.js?0507:3756) at dispatchDiscreteEvent (react-dom.development.js?0507:5889)
Uncaught TypeError: Cannot read property 'current' of undefined
at setRefValue (use-form.esm.js?c5f1:1013)
at setFieldValue (use-form.esm.js?c5f1:1211)
at onChange (Description.tsx?07db:61)
at handleChange (InputBase.js?ac10:359)
at HTMLUnknownElement.callCallback (react-dom.development.js?0507:3945)
at Object.invokeGuardedCallbackDev (react-dom.development.js?0507:3994)
at invokeGuardedCallback (react-dom.development.js?0507:4056)
at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js?0507:4070)
at executeDispatch (react-dom.development.js?0507:8243)
at processDispatchQueueItemsInOrder (react-dom.development.js?0507:8275)
at processDispatchQueue (react-dom.development.js?0507:8288)
at dispatchEventsForPlugins (react-dom.development.js?0507:8299)
at eval (react-dom.development.js?0507:8508)
at batchedEventUpdates$1 (react-dom.development.js?0507:22396)
at batchedEventUpdates (react-dom.development.js?0507:3745)
at dispatchEventForPluginEventSystem (react-dom.development.js?0507:8507)
at attemptToDispatchEvent (react-dom.development.js?0507:6005)
at dispatchEvent (react-dom.development.js?0507:5924)
at unstable_runWithPriority (scheduler.development.js?d068:468)
at runWithPriority$1 (react-dom.development.js?0507:11276)
at discreteUpdates$1 (react-dom.development.js?0507:22413)
at discreteUpdates (react-dom.development.js?0507:3756)
at dispatchDiscreteEvent (react-dom.development.js?0507:5889)
`
To Reproduce
Steps to reproduce the behavior:
<TextField label="Text" value={state.values.name || ''} onChange={(e) => setFieldValue('name', e.target.value)} />
Try using this snippet. Its causing the issue.
Desktop (please complete the following information):
Hey!
I just stumbled on this and I'm curious about the motivation of creating use-form instead of some of the existing and already quite great alternatives like react-hook-form & final-form?
What are the key differences from react-hook-form? API looks quite similar
Hello @jucian0 ,
I hope you are doing well.
Going through the documentation i found some typos and grammatical errors on 3 of the pages. So, i am opening this issue.
Thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.