paramsChanged

Updated:
Supported Platforms:
UUX

Listens for changed parameters.

paramsChanged allows you to listen for changed parameters. The passed function will be called every time the parameters change with a single argument containing a hash of the new parameters and their values.

paramsChanged is intended to be used with setParams and clearParams.

paramsChanged also allows you to unsubscribe from a particular passed function. In order to unsubscribe with paramsChanged, please see the example section below.

Details

Type

tecton.sources.paramsChanged(callback: (newParams?: IDict<string>) => void): () => void;

Example

tecton.sources.paramsChanged(function(newParams) {
  // do something with newParams
})

Additionally, in order to unsubscribe from a particular create a variable with paramsChanged, which can then be used to unsubscribe to the passed function when executed:

const unsub = tecton.sources.paramsChanged(function(newParams) {
})

unsub()

Arguments

UUX

Callback function which receives the new parameters as its single argument.

Release Notes

Initial Release