Giter Site home page Giter Site logo

jucian0 / createform Goto Github PK

View Code? Open in Web Editor NEW
186.0 7.0 17.0 9.55 MB

The ReactJS form library

Home Page: https://react-createform.vercel.app

License: MIT License

TypeScript 97.76% JavaScript 1.91% Shell 0.34%
hooks forms react react-hooks form-validation typescript javascript hacktoberfest hook form form-builder reactjs validation hacktoberfest2023

createform's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

createform's Issues

React-select with createform libraries. How can I handle a multiselect?

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

Discord Link Invalid

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.

TypeError: Cannot read property 'current' of undefined

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.

Screenshots
image

Desktop (please complete the following information):

  • Linux
  • chrome

Motiviation?

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.