Skip to main content

Update panel

A panel's params can be changed after it has been created, and the panel and its tab re-render with the new values. Use this for small amounts of static view data, not application or dynamic panel state.

Use this feature sparingly: Anything you assign to the params options of a panel will be saved when calling api.toJSON(). Only use this to store small amounts of static view data. Do not use this to store application state or dynamic panel state.

Methods

updateParameters
updateParameters(parameters: Parameters): void

Updating parameters

If you want to set initial parameters when adding a panel see the Add Panel section.

You can update a panel through the Panel API.

panel.api.updateParameters({
keyA: 'anotherValueA',
keyB: 'valueB',
});

To delete a parameter you should pass a value of undefined.

panel.api.updateParameters({
keyA: undefined,
});

See also

  • Adding panels: set the initial params when the panel is first created.
  • Rendering panels: how a panel re-renders in response to parameter changes.
  • Panel API: the panel API surface that exposes updateParameters.