Wishlist: Initial/render events for carousel

Hello,
…if there is a chance to suggest a wish for functionality, I think I would like to request some event in the carousel wich either equals “onAfterRender” or something similar. Now I have a carousel with 1. datatable, 2. dataview, 3.dataview and listening to all events on initializing, the datatable and dataview fire total 6 render-events, while carousel does not fire any.

So to set initial data loadings (I load only views which are being shown and some users may see view 1, others view 2 or 3) and determination of which view to show from carousel initially, I have to guess some “settimeout”, as it seems the carousel has no event where I can hook in once it is ready to load data and show views ?

Even Carousel onShow event does not work initially, but only after all is initialized already and when moves between views are made. OnFocus also is not firing.

A layout also does not have render-events, otherwise I would have put one around the carousel.

Maybe I overlooked something in the documentation or anyone has other good ideas ? I did not find anything in the forum about this, any thoughts appreciated…

Thanks so much,

Frank

why not to use setActive or setActiveIndex just after initialization?

…thanks intregal, I have deep layers of defining the forms and basically only one single central place to add views to main carousel, so between defining the objects in deep sub-structures (tables, data views, trees, other events and clicks …) and the actual assigning to parent object are sometimes hundert lines of code and that is why I need most of such code always in “AfterRender” events.

With the disconnect of parent object and sub-object I also de-couple screen functions/layouts/styles and can re-use them in many places, independent of the actual parent objects. I have one datatable, which is used in 7 places, in carousels, in segmented view, in window and also in popup and sub-views. So doing any loading and similar functions in AfterRender makes this a nice contained approach.

As a similar example I have one single central definition of a close button, which is used in about 100 places all over the application. So only events can make this happen…

For this carousel I now do a settimeout - setActive, but in really slow systems this could be a issue (time too short), while in fast systems you would wait for no reason. Not happy with this :neutral:

@fendrikat
https://snippet.webix.com/ay5tvly2

@intregal …nice one, thanks a lot for your support! Works like a charm, I think I have to get some deeper into JS…