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

handleChange parses value twice #17

Open
martijnvermaat opened this issue Jan 19, 2015 · 1 comment
Open

handleChange parses value twice #17

martijnvermaat opened this issue Jan 19, 2015 · 1 comment

Comments

@martijnvermaat
Copy link
Contributor

I think values are parsed twice in the handleChange handlers, since the parser is also called in the normalizer.

See this handler for example.

@odf
Copy link
Contributor

odf commented Jan 21, 2015

Thanks for bringing that to my attention! Since normalizing and parsing are always done together, it might make more sense to have a single function that returns both the normalized text and the parsed value, if any.

We now have a bit of duplication between the input components, and more so after considering #18, so I think I should look into further refactoring some of that code. But first it's probably a good idea for me to sort out testing.

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