Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

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

Open
timataran opened this issue Jul 1, 2017 · 0 comments
Open

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

timataran opened this issue Jul 1, 2017 · 0 comments

Comments

@timataran
Copy link

timataran commented Jul 1, 2017

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?

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

No branches or pull requests

1 participant