You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, not really an issue but more a question/feature request.
Is there any way that i can trigger a callback function on a rivets components viewModel anytime the arguments to the component change? I have a plugin that needs some manual setup/configuration within the view. I would like to trigger the functions that do this from within the component every time the arguments change. I was thinking something along the lines of the following:
rivets.components['session-chooser'] = {
template: function() { return SessionChooser.prototype.HTML; },
initialize: function(el,attr) {
let viewModel = new SessionChooser(el,attr);
this.observers.event.callback <- point this at a function on the viewModel somehow or add another observer to do so..
return viewModel;
}
}
The text was updated successfully, but these errors were encountered:
Hello, not really an issue but more a question/feature request.
Is there any way that i can trigger a callback function on a rivets components viewModel anytime the arguments to the component change? I have a plugin that needs some manual setup/configuration within the view. I would like to trigger the functions that do this from within the component every time the arguments change. I was thinking something along the lines of the following:
rivets.components['session-chooser'] = {
template: function() { return SessionChooser.prototype.HTML; },
initialize: function(el,attr) {
let viewModel = new SessionChooser(el,attr);
this.observers.event.callback <- point this at a function on the viewModel somehow or add another observer to do so..
return viewModel;
}
}
The text was updated successfully, but these errors were encountered: