paramsChanged

Updated:

Listens for changed parameters.

Description

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. It is intended to be used with setParams and clearParams and also allows you to unsubscribe from a particular passed function.

Signature

tecton.sources.paramsChanged(callback: (params: Record<string, string>) => void): () => void;

Usage

Listen for parameter changes.

const unsubscribe = tecton.sources.paramsChanged((params) => {
    console.log('Current params:', params);
    if (params?.accountId) {
        loadAccount(params.accountId);
    }
});

Later, to stop listening:

unsubscribe();

Parameters

callback

Platform Support

UUX

Changelog

The changelog provides a detailed history of new features, improvements, and bug fixes going back to Tecton 1.30.0. If the button is disabled, it indicates there have been no detectable changes since then.

Show changelog (0)