Closed shripalsoni04 closed 8 years ago
@shripalsoni04 I was looking into this, I'm not familiar with the notify function, but do we need the object to be an observable or can it just be the currentPanel object?
Notify function is used to emit custom events. As per the documentation of custom events, notify method takes the implementor of EventData Interface as an argument. This EventData Interface only accepts observable
as the object
value.
Though I have tried to send a plain object as an object
value in notify
function, it is also working properly without any issue.
But, I think we should send observable
as object
value in notify
method so that any future change in event mechanism of nativescript do not break this.
Hi @shripalsoni04 @sitefinitysteve end up adding these going above and beyond and adding a couple other events. It's merged now and I should have it published to npm this evening. :+1:
I think currently we don't have any way to know when slide is changed. It will be very good if we have an event whenever slide is changed to satisfy scenarios like changing state of some controls, which are not inside slide, depending on active slide.
After having a quick look at code, I think we can call
notify
at the end ofsetupPanel
method like this:What do you think?