Closed wellers closed 8 years ago
The latest NuGet package addresses this, which is being indexed by NuGet now and so will be available soon -
https://www.nuget.org/packages/Bridge.React/1.6.1
You need to use "Value" if Multiple is false and Values if Multiple is true (it would be nice to incorporate an analyser that ensures that you are making an appropriate selection, rather than waiting for a runtime warning from React, but that won't be in this release).
The latest NuGet package (Bridge.React 1.6.2) includes an analyser that warns about simple misuses of Multiple / Value / Values - if there is an object creation initialiser where Multiple is set to false (or not specified, leaving it to default to false) and the Values property is set then a warning will be recorded, similarly if Multiple is set to true and the Value property is set.
It only attempts to catch these simple cases - if Multiple is set to a variable's value or is set to the return value of a method then the analyser bails out.
You may have to restart Visual Studio after installing this update for the analyser to start working.
When I try to render a HTML select box using Bridge.React.DOM.Select, if I set the "Multiple" property in the SelectAttributes to "true" a React warning is thrown that states...
"The
value
prop supplied toI looks when the multiple is set to true, React expects an the Value property to be an array and not a string.