last day (15 days later) » 

3:20 AM
0
A: Polymer - Fire not updating the UI checkboxes

HakanCAbove your details event, will fire an event with on-<your-custom-event> at parent element as on-details So you need to assign a listener something like at parent: <child-element on-details = '_detailsChanged'> </child-element> ... Polymer {( _detailsChanged: function(e) { // ...

 
Thank you for the comment. The solution you provided is not working. I think the issue is, changes are making in array in details and details object is not aware of those changes in array.
 
Which option you trying
 
I am trying second one
 
Please provide more details about error. As this is very common usage at Polymer. And there may need a small adjustment. Objects or Arrays needs observable changes in order to reflect at parents. Here the link for more details
 
The issue I think is. that details have an array of objects which I am making changes to. That array object changes are not getting reflected.
details.person.push({ name: 'John', id: '1234', isLinked: true }); While I am adding this to the existing details, record is showing up but john, 1234 and checkbox for islinked are not populating in UI
 
3:20 AM
Ok. Please give the code how you do changes at detail property. Because the code top above has a syntax error. Also consider this.set('details', this.details) has no sense.
If you can see the new value at child element with console.log or what ever. You can observe at parent element with using : this.notifyPath ('details.person')
Check the link above I provided. Shows very detailed and clear info.
 
Hi, Can we please chat here?
 
Ok. I think it will work after my last ino
 
I am sorry
 
*info
 
My scenario is little more complicated
Don't want to share my code over the web.
 
3:23 AM
Go ahead, I will try to answer
 
_linkItem: function () {
for (var i = 0; i < this.colorway.yarns.length; ++i) {
var yarn = this.colorway.yarns[i];
if (yarn.isLinked === true && yarn.palettePosition === null) {
var selectedLinkedPosition = this.$.colorwayMenu.selected;
yarn.isLinked = true;
yarn.palettePosition = yarn.sortOrder;
yarn.linkedPalettePosition = selectedLinkedPosition;
yarn.linkedText = "Linked to " + selectedLinkedPosition;

var linkedYarn = this.colorway.yarns[selectedLinkedPosition - 1];
linkedYarn.isLinked = true;
basically, this is my code.
What I am trying to do is, I am trying to link two items...by looping through object colorway. This object colorway has yarns array. so, I am making changes to yarns array.
you can see that in for loop, After that I am closing the dialog and notifying the parent
Does it make sense so far?
 
I use now mobile phone. So if you could share with mail. I will definitely try to help over mail. I can not see the long code clear.
 
ok, can you please provide your email address?
 
netcat16@gmail.com
 
Thanks, will send an email shortly
I know I am missing very small thing not sure what it is
 
3:29 AM
There may be you notifying before loop finished.
Also this.set('colorway', this.colorway) is wrong !!!
Both side the same item
 
Have a question as I am new to polymer
 
Wait i will try to check al
 
this.set('colorway') - I thought this colorway is the name of the dom element, is it wrong?
 
There are some serial mistake s. So please allow me time. I will solve it and send it by mail. Now 06.38. I am in bed still 😅
 
Oh sorry for that, I thought you are in east coast
I just sent you an email with all the code
 
3:41 AM
Ok. I got it. Nope. I will reply by email
 
Thank you so much
 
Your welcome 😊
Bye
 

last day (15 days later) »