gwt-polymer-elements icon indicating copy to clipboard operation
gwt-polymer-elements copied to clipboard

Iron-list is not selectable

Open confile opened this issue 9 years ago • 3 comments

Using the sample from here: http://vaadin.github.io/gwt-polymer-elements/demo/#iron/IronListSample

The iron-list items are not selectable.

@manolo Is there anything one has to add to make then selectable?

I tried:

  @UiField 
  IronList resultList;

Polymer.ready(resultList.getElement(), arg -> {

       resultList.setSelectionEnabled(true);
       resultList.getPolymerElement().addEventListener(IronSelectEvent.NAME, event -> {

        GWT.log("selected!!");

      });
      return null;
    }); 

but it never fired.

confile avatar Feb 11 '16 19:02 confile

The problem is that you cannot set tabindex$="[[tabIndex]]":

<iron-list items="[[data]]" as="item">
  <template>
    <div tabindex$="[[tabIndex]]">
      Name: [[item.name]]
    </div>
  </template>
</iron-list>

UIBinder will not allow this.

confile avatar Feb 12 '16 18:02 confile

May be you could add some clever helper method to have a workaround.

confile avatar Feb 12 '16 18:02 confile

could you provide your entire ui.xml file ? seems like you need an auxiliary template for the data binding

manolo avatar Oct 27 '16 08:10 manolo