polymer - Dynamically Generating Bind Variable Names -


i have data grid, in use dom-repeat generate columns.

<vaadin-grid-filter value=[[filterinput]] />  <input value={{filterinput::input}} /> </vaadin-grid-filter> 

i bind value used filter column value input input element.

my problem each column binds same filterinput variable.

is there way can bind using variable each specific column?

could somehow generate binding variable each column, e.g. filterinput[0], filterinput[1] etc. using index variable comes dom-repeat?

i make working element.

html template

<template is="dom-repeat" items="{{technology}}">     <input type="text" value="{{item.label::input}}">[[item.label]]<br/> </template> 

polymer element

technology : {     type: array,     value: [         {id:"php", label:"php", selected:false},         {id:"js", label:"javascript", selected:false},         {id:"html", label:"html", selected:false},         {id:"css", label:"css", selected:false},     ] } 

full polymer element

<dom-module id="input-array-element">     <template>         <h3>inputs array</h3>         <template is="dom-repeat" items="{{technology}}">             <input type="text" value="{{item.label::input}}">[[item.label]]<br/>         </template><br>     </template>     <script>     class inputarrayelement extends polymer.element {         static is() { return 'input-array-element'; }          static properties() {             return {                 technology : {                     type: array,                     value: [                         {id:"php", label:"php", selected:false},                         {id:"js", label:"javascript", selected:false},                         {id:"html", label:"html", selected:false},                         {id:"css", label:"css", selected:false},                     ],                     notify: true                 }             }         }          ready() {             super.ready();             this.addeventlistener("technology-changed", function(e){                console.log(e);              });         }      }      window.customelements.define(inputarrayelement.is, inputarrayelement);             </script> </dom-module> 

Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -