Skip to content

Conversation

@andreme
Copy link
Contributor

@andreme andreme commented Oct 16, 2016

fixes #1284

@coveralls
Copy link

Coverage Status

Coverage decreased (-59.0%) to 33.29% when pulling 38dc104 on andreme:allow_options_with_value_0 into b4a087e on JedWatson:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 92.267% when pulling 341cc07 on andreme:allow_options_with_value_0 into b4a087e on JedWatson:master.

* @returns {Array} the value of the select represented in an array
*/
getValueArray (value, nextProps) {
getValueArray (value, nextProps = undefined) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed? is not the default behaviour?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes you're right, but my IDE was warning me that this function was sometimes called with only 1 argument. I thought making it explicit wouldn't hurt.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This param being optional should be indicated in the jsdoc http://usejsdoc.org/tags-param.html#optional-parameters-and-default-values, which should also stop the IDE warning

@msaglietto
Copy link

Nice it looks good to me, I agree that 0 it a possible value should not be consider as empty 👍

@grumd
Copy link

grumd commented Nov 22, 2016

Is this going to be merged any time soon?

@hillerstorm
Copy link

No merged PRs since mid-november? Would really like this one to land :/

@bmv437
Copy link

bmv437 commented Apr 26, 2017

It would be great to get this merged 👍

@gwyneplaine
Copy link
Collaborator

Thanks for this @andreme, this has been fixed elsewhere in #1395

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

Successfully merging this pull request may close these issues.

Clearable icon doesn't show on value = 0

8 participants