These are chat archives for canjs/canjs

6th
Dec 2017
Eben
@eben-roux
Dec 06 2017 12:18
hello, been working on some basic ui controls that I'll be using on my projects and would welcome any comments/suggestions:
Mohamed Cherif Bouchelaghem
@cherifGsoul
Dec 06 2017 16:34
@eben-roux thank you, I suggest to use modlet workflow https://www.bitovi.com/blog/modlet-workflows
@eben-roux use donejs add plugin is easier and can help you for the workflow and split the component in separate repos
Chasen Le Hara
@chasenlehara
Dec 06 2017 17:36
Sweet, thanks for sharing @eben-roux! Will definitely take a look
Joel Kuzmarski
@leoj3n
Dec 06 2017 18:16
Is there an event or way to listen for when the element is fully hydrated, not just inserted? This is for a CanJS Component with view that iterates over items returned from a ViewModel getter (need to wait until all elements within the component have been insterted into the DOM, but the inserted event seems to fire when the component itself has been inserted, before inner elements are hydrated).
Mohamed Cherif Bouchelaghem
@cherifGsoul
Dec 06 2017 18:20
@leoj3n once I asked a question how to know if element (component) is fully rendered! I dont know if it is the same use case but @phillipskevin told me to use {element} inserted and it worked for my case
Joel Kuzmarski
@leoj3n
Dec 06 2017 18:20
@cherifGsoul Thanks I'll try it.
Joel Kuzmarski
@leoj3n
Dec 06 2017 18:28
@cherifGsoul Thanks for the help, but it turns out it wasn't an issue with events. Your event '{element} inserted': function() {} seems to work just the same as inserted() {}. After trying that, I realized this component relys on a promise in the appViewModel (a level above it), so I made sure the component is now wrapped in the {{prom.isResolved}}. Wrapping it in the promise resolved check fixed my issue.
Mohamed Cherif Bouchelaghem
@cherifGsoul
Dec 06 2017 18:39
Ok :+1: