Telogical / telui-combobox

TelUI
0 stars 0 forks source link

Tons of warning 'Invalid prop `id` of type `number` supplied to `Radio`, expected `string`. Check the render method of `Radiogroup`. #26

Open twpoonus opened 9 years ago

twpoonus commented 9 years ago

There are a tons of these warning messages like over 300. Please see attached.

tons_of_radiogroup_warnings

twpoonus commented 9 years ago

These is causing the browser to stagger quite a bit.

jhare commented 9 years ago

We can probably just remove the log call

On Fri, May 29, 2015, 12:01 PM Te Poon notifications@github.com wrote:

These is causing the browser to stagger quite a bit.

— Reply to this email directly or view it on GitHub https://github.com/Telogical/TelUI-ComboBox/issues/26#issuecomment-106871213 .

the-simian commented 9 years ago

this is actually the validator, and it expects a string.I don't want to remove the input validation, can you not just provide the correct type or do we need to coerce? we can .toString() it internally if we must, but that might hide other problems. (like passing a function, that gets stringified and actually becomes a function in the id)

the-simian commented 9 years ago

I've been thinking about this for some time, and after we finish eyeglass, Id like to address the validation in a few of these plugins.

I really like Joi, and it might be a more suitable replacement for the react internal prop checking stuff.

There's some ways people have mixed in joi:http://jurassix.github.io/react-validation-mixin/

There's a larger discussion about data sanitization I think we need to have. Some things, like Hapi use validation for input and pout of controllers. There's also the fact that Json Schema v4 is out now and it has capabilities also. This prop for instance - it would be nice to expect strings or numbers, and that's it.