You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Some plugins may need to get data source selected info through data source selector components, there isn't a centralized way to record or manage this.
Describe the solution you'd like
We plan to add a service named DataSourceSelection in DSM to support this. In setup stage of DSM, a instance of DataSourceSelectionService would be generated and this instance will be passed to each data source selector or menu component and returned to other plugin. Selector component can stored selected data source through this instance and other plugin can subscribe or get selected data source through this instance.
class DataSourceSelection {
// This is an observable map to record all selected data sources in OSD.
// This data is stored in memory and will be cleared with OSD context and reset if page reloads.
// The key of map is the id of each selector component.Since DSM provides several components and there can be many components on the page at the same time,the component needs to generate an unique ID to specify itself when mounted.
// The value would be the detail info of selected data source.
private selectedDataSource$ = new BehaviorSubject(new Map<string, DataSourceOption[]>());
// When users select data source through component, component will call this function to set selected data source.
public selectDataSource = (componentId: string, dataSource: DataSourceOption[]) => {
};
// When component unmounts, it will call this function to delete stored selected data source.
public remove = (componentId: string) => {
};
// Other plugins can call this function to get all selected data source value.
public getSelectionValue = () => {
};
// Other plugins can call this function to get observable subject, component can use this value to subscribe update.
public getSelection$ = () => {
};
}
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Some plugins may need to get data source selected info through data source selector components, there isn't a centralized way to record or manage this.
Describe the solution you'd like
We plan to add a service named
DataSourceSelection
in DSM to support this. In setup stage of DSM, a instance ofDataSourceSelectionService
would be generated and this instance will be passed to each data source selector or menu component and returned to other plugin. Selector component can stored selected data source through this instance and other plugin can subscribe or get selected data source through this instance.The text was updated successfully, but these errors were encountered: