setComponentState(key, object)
Updates the state of a specified UI component. The updated state is stored in a browser session.
Returns
Not applicable.
Parameters
Name | Type | Description | Required |
key | string | The ID of the UI component whose state must be updated. | ✅ |
object | JSON object | The data that must be set as the state of the UI component. | ✅ |
Usage example
In this example, the API updates the state of a UI component whose key is
on8ttl-c11ngall-work-d-2001-caseview
.
PCore.getComponentsRegistry().setComponentState("on8ttl-c11ngall-work-d-2001-caseview", { active: 0});
Previous topic getComponentState(key) Next topic APIs in the PersonalizationUtils module