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

The NumericSelect.js demo file is broken when selecting the multi-select checkbox #1810

Closed
elkarouh opened this issue Jun 22, 2017 · 10 comments

Comments

@elkarouh
Copy link

Thanks for using react-select!

If you are reporting an error please include a test case that demonstrates the issue you're reporting!
This is very helpful to maintainers in order to help us see the issue you're seeing.

Here is a Plunker you can fork that has react-select loaded and supports JSX syntax:
https://plnkr.co/edit/HTmtER9AMNcPoWhXV707?p=preview

You may also find the online Babel tool quite helpful if you wish to use ES6/ES7 syntax not yet supported by the browser you are using.

@agirton
Copy link
Collaborator

agirton commented Jun 22, 2017

Hi @elkarouh thank you for reporting. I can confirm this is in fact broken. Would you like to submit a PR to fix it? 😄

@elkarouh
Copy link
Author

elkarouh commented Jun 23, 2017 via email

@agirton
Copy link
Collaborator

agirton commented Jun 23, 2017

Oh ok, no problem! Would you like some guidance on where to look to fix it?

@eric-ships
Copy link

eric-ships commented Jun 23, 2017

Hi @agirton I am looking to contribute to open-source and wouldn't minding taking a look.

It seems like I need to fix something in NumericSelect.js.

If you guys don't mind, can I be assigned to this?

@agirton
Copy link
Collaborator

agirton commented Jun 23, 2017

Hi @ericliu121187 that would be great! It's possible there is an underlying issue with the combination the example uses: simpleValue, multi select and numbers. I will remove the help wanted label since you would like to take this on.

@eric-ships
Copy link

eric-ships commented Jun 25, 2017

Yup! The following seemed to fix it.

// NumericSelect.js, line 42
onChange(value) {
  this.setState({
    value: this.state.multi ? value.split(',').map(Number) : value
  });
console.log('Numeric Select value changed to', value);
},

Concerns:

  1. I don't have permission to push to origin. How should I proceed?
  2. Is there a particular branch naming convention and PR template that you would prefer?
  3. It seems like there is no test for this file, right? Should I make one?
  4. Also, example/dist/app.js keeps getting updated as well. Should that folder be included in the .gitignore?
  5. The build does not work with node v.8. I'm not exactly sure what is the most recent non-breaking version the build supports, but it might be worthwhile to mention in the README.md. (I ended using v4.2.1.)

@audiolion
Copy link

@agirton
Copy link
Collaborator

agirton commented Jun 27, 2017

Hi @ericliu121187 if the NumericSelect has this issue. It's very possible that there is an underlying issue.

It looks there is a PR with a fix for this #1600. Also found a duplicate issue #1476. So going to close out this in favor of that ticket.

My apologies for not finding this sooner and wasting your time 😞 .

@agirton agirton closed this as completed Jun 27, 2017
@eric-ships
Copy link

@agirton There doesn't seem to be any underlying issue. It's just that simpleValue returns a string and select expects an array when multiValue is selected.

No problem! Is there another issue I can help with?

@audiolion Ah, thanks!

@agirton
Copy link
Collaborator

agirton commented Jun 27, 2017

@ericliu121187 we have quite a long list of issues 😄 . At this time nothing stands out to me as good intro tickets. But feel free to go through the list and see if there are any issues that might be easy to take on that doesn't already have a PR open.

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

4 participants