Skip to content
This repository has been archived by the owner on Oct 23, 2021. It is now read-only.

sp component base.dynamicdatasourcemanager

John Nguyen edited this page Apr 22, 2021 · 2 revisions

Home > @microsoft/sp-component-base > DynamicDataSourceManager

DynamicDataSourceManager class

The Dynamic Data Source Manager is responsible for: - Constructing the dynamic data source - Allowing initialization of the dynamic data source by a component - Allowing data source to update its metadata and notify when data has been updated.

Signature:

export default class DynamicDataSourceManager implements IDisposable

Implements: IDisposable

Properties

Property Modifiers Type Description
isDisposed boolean Returns true if the DynamicDataSourceManager is disposed.
sourceId string Returns the Id of the current DataSource. If the component did not initialize as a dynamic data source, then it returns an empty string.

Methods

Method Modifiers Description
dispose() Disposes the resources held by the Dynamic Data source.
initializeSource(callableFunctions) Initializes the Dynamic Data Source for the component.
notifyPropertyChanged(propertyId) Notifies that this source has updated a specific property.When invoked, it enables to broadcast the notification to all the consumers who have registered to this notification from this source.
notifySourceChanged() Notifies that this source has updated its properties.When invoked, it enables to broadcast the notification to all the consumers who have registered to this notification from this source.
updateMetadata(metadata) Updates the metadata of the Dynamic Data Source. It allows to update fields like title or description. Auto-generated fields like alias, componentId or instanceId cannot be updated.
Clone this wiki locally