Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleExample
Code Block
languagejs
getItemTemplateParams: function () {
    return {
		external_id: 1234,
	};
},

set()


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
titleExample
Code Block
languagejs
onStateChange: function () {
    if (this.dashboard.state.get('additionalInfo')) {
        this.$el.addClass('additional-info-requested');
    }
},

set()

state.set(attribute, value)
state.set(attributes)

...