Hello,
I am a maintainer for an open source project Egeria and am looking to create a CRUD grid in Polymer. It appears that there are not free versions of this. I would be interested in what approach people recommend.
In the absense of a free sufficiently capable component, I am looking to see if I can create a grid component - I am a bit of newbie at Polymer.
I have an array of json objects pairs that I use as the data for a property pane. The json objects have a name, type and value. I successfully use a dom-repeat to display each json object as a property in a property pane - which the type dictating what sort of widget I use.
I would like to use the same sort of idea to back a grid with an array of json objects with property name item and the valuer as the propertyArrays.
I have a gridView as (view item is {{item}} is debug coe to prove I have an item: it displays as expected as "view item is [object Object]". But the item passed to the property-row does not update the modelInstance property. The item is {{item}} is never displayed. I cannot see what I am doing wrong.
The grid component view has:
<form is="iron-form">
<dom-repeat items={{modelInstances}} mutable-data>
<template>
<p>
view item is {{item}}
<property-row modelInstance={{item}}> </property-row>
</p>
</template>
</dom-repeat>
</form>
then property-row component has
<dom-repeat items="{{propertyArray}}" mutable-data>
<template>
item is {{item}}
</template>
</dom-repeat>
modelInstance: {
type: Object,
notify: true,
observer: '_handleModelInstanceChanged'
},
propertyArray: {
type: Array,
notify: true,
value: function() { return []; },
computed: '_computePropertyArray(modelInstance)'
},
_computePropertyArray(instance) {
return instance.item;
}
Many thanks, David,