Use an polymer element attribute inside core-list

78 views
Skip to first unread message

Sachin Kumar

unread,
Sep 29, 2014, 5:56:24 AM9/29/14
to polym...@googlegroups.com
I am assigning data in attribute of a polymer element from index page
index page:
var class = document.querySelector('sn-details'); 
class.stus = data.stus;
class.isAdmin = data.isAdmin;

and my polymer element is :

<polymer-element name="sn-details" attributes="stus isAdmin">
<template>
        <core-list id="list" data="{{stus}}" height="80">
        <template>
            <div class="item {{ {selected: selected} | tokenList }}">
             <div class="body">{{["stus.fName"]}}
                <div hidden ?={{isAdmin != 'false'}}><paper-icon-button id="removeClass" icon="remove" on-tap="{{removeUserFromClass}}"></paper-icon-button></div>
             </div>
            </div>
        </template>
</core-list>
</template>

now I want to use this isAdmin attribute inside the core-list so that the delete icon will be displayed only for the admin of the class
but here in core list it looks for stus.isAdmin which is not available so it is creating problem.Please tell me how to reslove it?

Steve Orvell

unread,
Sep 29, 2014, 12:35:30 PM9/29/14
to Sachin Kumar, polym...@googlegroups.com
This is not currently supported, but it could possibly be. Can you file an issue (https://github.com/Polymer/core-list/issues)? Thanks.

The `core-list` element has some special data handling to support dom virtualization. This is why a scoped model is not supported automatically right now.

Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/9a3385c0-a995-4823-aeab-6d92f41c5055%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages