Skip to content
This repository has been archived by the owner on Dec 19, 2017. It is now read-only.

core-selector does not refresh #115

Open
shailen opened this issue Sep 24, 2014 · 0 comments
Open

core-selector does not refresh #115

shailen opened this issue Sep 24, 2014 · 0 comments

Comments

@shailen
Copy link

shailen commented Sep 24, 2014

Assume the following Dart code:

@CustomTag('my-element')
class MyElement extends PolymerElement {
  final List<String> colors = toObservable(['red', 'green', 'blue']);
  MyElement.created() : super.created();
}

And the following HTML:

<polymer-element name="my-element">
  <template>
    <style>
      .core-selected {
        font-weight: bold;
      }
    </style>
    <core-selector id="selector" selected="1">
      <template repeat="{{color in colors}}">
        <div value="{{color}}">{{color}}</div>
      </template>
    </core-selector>
    <hr>
    <!-- Prints the selected index, but does not update -->
    <div>{{$['selector'].selected]}}</div> 
  </template>
  <script type="application/dart" src="my_element.dart"></script>
</polymer-element>

Using <div>{{$['selector'].selected]}}</div> correctly shows the index of the selected color, but picking a different color does not refresh the value of selected.

Using core-elements 0.2.2+1 and Polymer 0.14.2+1.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant