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

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

Open
@timataran

Description

@timataran

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions