...
Expand |
---|
|
Code Block |
---|
| getItemTemplateParams: function () {
return {
external_id: 1234,
};
}, |
|
Dashboard State
The dashboard state is accessible in the widget using the widget.dashboard.state
property. This model is the recommended way for custom widgets to talk to each-other. The dashboard state is a Backbone.js model though without persistence.
...
Expand |
---|
|
Code Block |
---|
| onStateChange: function () {
if (this.dashboard.state.get('additionalInfo')) {
this.$el.addClass('additional-info-requested');
}
}, |
|
state.set(attribute, value)
state.set(attributes)
...