In iron-list selectedItem works ok for e.g. String, but for structured datatypes get to member data fails. Stackoverflow discussion http://stackoverflow.com/questions/33448961/polymer-1-0-iron-list-selection
The html and dart snippets are inserted below. When a selection is done following is obtained:
>Contains : false
>Uncaught Unhandled exception:
>NoSuchMethodError: method not found: 'shorttext'
>Receiver: Instance of 'JsObjectImpl'
With convertToDart(e.selectedItem); the object becomes valid. The Observe argument newValue is valid and no conversion needed.
In
iron-list selectedItem
works ok for e.g. String, but for structured datatypesget
to member data fails. Stackoverflow discussion http://stackoverflow.com/questions/33448961/polymer-1-0-iron-list-selection The html and dart snippets are inserted below. When a selection is done following is obtained:With
convertToDart(e.selectedItem);
the object becomes valid. The Observe argument newValue is valid and no conversion needed.Html
Dart
From pubspec.yaml