polymer_elements icon indicating copy to clipboard operation
polymer_elements copied to clipboard

paper-slider uses behaviors with conflicting `value` properties

Open zoechi opened this issue 10 years ago • 3 comments

The IronFormElementBehavior has String get value => ... and the IronRangeBehavior num get value =>. I don't know behaviors well enough yet to know where I should create the bug report. My guess would be that IronRangBehavior should renamevaluetovalueAsNumber`.

zoechi avatar Oct 08 '15 17:10 zoechi

same basic issue as https://github.com/dart-lang/polymer_elements/issues/87

jakemac53 avatar Oct 08 '15 17:10 jakemac53

Renaming the getters wouldn't actually solve the issue either. The original value getter would still end up returning a number, not a String.

jakemac53 avatar Oct 08 '15 17:10 jakemac53

Sorry I didn't explain myself properly. The idea was to motivate the Polymer.js team to rename the function. This would be according to the names in the input field itself. The value of <input type="number"> returns a string and valueAsNumber as number (or valueAsDate for <input type="date">). If they don't want such a breaking change they could just provide additional functions (even "private" _valueAsNumber) that are compatible with Dart. This might also help for TypeScript. No need to clarify before your vacation ;-)

zoechi avatar Oct 09 '15 09:10 zoechi