jupyter / declarativewidgets

[RETIRED] Jupyter Declarative Widget Extension
http://jupyter.org/declarativewidgets/docs.html
Other
120 stars 38 forks source link

urth-viz-table, selectionIndex property doesn't work #563

Open timataran opened 7 years ago

timataran commented 7 years ago

Initially I was trying to use selectionIndex property to set selection in table, but then noticed that I can't even get its value. Here is my example: The table:

%%html
<link rel="import" href="urth_components/urth-viz-table/urth-viz-table.html" is='urth-core-import'>
<template is="urth-core-bind">
    <urth-viz-table datarows='[["Robin","Jackman"],["Matt","Billock"],["Tony","Hirst"]]'
        columns='["First_name", "Last_name"]'
        selection="{{sel}}"
        selectionIndex="{{sel_idx}}"
        rows-visible="4"
        selection-as-object>
    </urth-viz-table>
</template>

Print out sel_idx variable (it prints nothing):

%%html
<template is="urth-core-bind">
    <h2>[[sel_idx]]</h2>
</template>

Print selected data (this one works fine):

%%html
<template is="urth-core-bind">
    <h2>Selected user is [[sel.First_name]] [[sel.Last_name]] </h2>
</template>

Am i doing something wrong?