Skip to content

Conversation

clodal
Copy link

@clodal clodal commented Aug 30, 2017

Updated Option proptypes to allow Number type in the value attribute.
Issue: #115 and Ant Design #2857

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 8b305e5 on clodal:accept-number-type-value into 527fc45 on react-component:master.

@yesmeck
Copy link
Member

yesmeck commented Aug 31, 2017

Some inner logics rely on string type of value (like util.js#L59). So only change propTypes won't work.

@yesmeck
Copy link
Member

yesmeck commented Aug 31, 2017

Actually, I've proposed a PR #120 months ago, but @yiminghe suggests value should allow any type.

@clodal
Copy link
Author

clodal commented Aug 31, 2017

@yesmeck ah i see, thanks. I could have a look at utils later to see what else is affected. 谢谢你

@cdimitroulas
Copy link

cdimitroulas commented Sep 27, 2017

Can this PR be extended to allow all data types rather than just number or string? It would be good to allow objects, booleans or anything really!

@yesmeck
Copy link
Member

yesmeck commented Sep 27, 2017

I'm handling this, object is complex in current architecture (I'm not going to support it), and I think boolean is useless, if you want to use boolean value in select, I think using radio is a better choice.

@yesmeck yesmeck closed this Sep 27, 2017
@cdimitroulas
Copy link

yes I agree boolean is pointless. object would have been nice but I understand it may be complicated to implement.

Thanks for your reply.

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.

4 participants