Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: Cannot read property 'match' of undefined #125

Open
alburritos opened this issue Jun 10, 2017 · 6 comments
Open

Uncaught TypeError: Cannot read property 'match' of undefined #125

alburritos opened this issue Jun 10, 2017 · 6 comments

Comments

@alburritos
Copy link

I'm trying to use Form.button so that I can validate only one group of fields within a Form component.

                      <Form.Button
                        group="data"
                        component={ Button }
                        key="save"
                        type="button"
                        className="save"
                        onClick={ () => console.log('lol') }
                      >
                        Save
                      </Form.Button>,

All the Form.Field components that are relevant have the prop group="data" as well.

But then I click on the button, I get an Uncaught TypeErorr, which in my bundle leads me to here:

	  split: function(path){
	    return path.match(SPLIT_REGEX)
	  }

Any idea how to fix this? I can't find any other way to selectively validate a form.

@alburritos
Copy link
Author

@jquense Could you please advise on how I would validate a particular group of input fields within a form?

@jquense
Copy link
Owner

jquense commented Jun 20, 2017

hey there, sorry. I believe I've fixed this bug in the most recent release can you confirm whether that's true or not?

@alburritos
Copy link
Author

Is there a changelog? I don't see one. Just want to make sure there's no breaking changes from 0.23.0

@jquense
Copy link
Owner

jquense commented Jun 20, 2017

No functional changelog.com at the moment but changes should be safe (I think)

@alburritos
Copy link
Author

@jquense

Thanks for the follow up. I've upgraded to 0.25.4, and when I have the type of Form.Button

                      <Form.Button
                        group="data"
                        key="save"
                        type="button"
                        component={ Button }
                        className="button"
                        onClick={ () => console.log('abc') }>

set to "button", I still get

Uncaught TypeError: Cannot read property 'match' of undefined

All the Form.Field entries that I need to to be validated that are associated with this group are have the prop group="data", and so does Form.Button.

@jquense
Copy link
Owner

jquense commented Jun 21, 2017

Thanks, I'll take a look. Do you think you could put together a minimal reproduction that demonstrates the issue? It'll be easier to track down the bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants