On Friday, July 19, 2019 at 5:08:09 PM UTC+1, david radley wrote:
>
> 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, 
>
>
>
> I have raised 2 questions on stack overflow relating to what I am trying 
> to achieve. I have tried to describe the exact issues I am seeing with code 
> supplied to recreate 
> https://stackoverflow.com/questions/57150174/polymer-array-mutations-are-not-reflected-into-child-component
>  and 
> https://stackoverflow.com/questions/57146636/polymer-mutabledata-mixin-only-honour-mutations-with-notifypath
> . 
>
>

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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/ab5edb59-8278-4773-9325-3444f5e3df09%40googlegroups.com.

Reply via email to