HriBB / react-mdl-selectfield

Selectfield component for react-mdl
MIT License
4 stars 1 forks source link

Problem with value == 0. #1

Open vegansk opened 8 years ago

vegansk commented 8 years ago

Option's value of 0 is handled like there is no value. Sometimes 0 must be a valid identifier.

vegansk commented 8 years ago

It happens with v0.1.3, maybe it's fixed in master, can't check. npm install fails with:

43 error addLocal Could not install /tmp/vega/npm-12680-c7277e78/git-cache-9d6c932e/6c7e45cd316c8e6e40bf972c2c5f39e6ea3a4e84
44 silly fetchPackageMetaData Error: No version provided in package.json
HriBB commented 8 years ago

Hello @vegansk.

Uhh sorry about that, but this project is in a bit of a mess ATM. I am in the process of rewriting all components to be completely stateless. After that, SelectField will become a part ofreact-mdl-extra` and this package will be deprecated. I was hoping to do it this week, but I was pretty busy at work. In the meantime, you can fork the repo (I think that this commit has the latest statefull code.

Anyway, the idea is to group all components that do not fit into react-mdl into a common react-mdl-extra package. Here's the preview and the examples.

SelectField uses the new Dropdown component which uses react-portal to render itself into the body (no more overflow:hidden problems).

Let me know if I can help you anyhow ;)