MCPcopy
hub / github.com/microsoft/SandDance / setSideTabId

Method setSideTabId

packages/sanddance-explorer/src/explorer.tsx:792–805  ·  view source on GitHub ↗
(sideTabId: SideTabId, dataScopeId?: DataScopeId)

Source from the content-addressed store, hash-verified

790 }
791
792 private setSideTabId(sideTabId: SideTabId, dataScopeId?: DataScopeId) {
793 if (sideTabId === SideTabId.Data && dataScopeId == null) {
794 //choose most relevant DataScopeId
795 dataScopeId = this.getBestDataScopeId();
796 }
797 if (dataScopeId == null) {
798 dataScopeId = this.state.dataScopeId;
799 }
800 const calculating = () => {
801 this.dialogFocusHandler.focus && this.dialogFocusHandler.focus();
802 };
803 this.setState({ sideTabId, dataScopeId, sidebarClosed: false, calculating });
804 this.activateDataBrowserItem(sideTabId, dataScopeId);
805 }
806
807 private getBestDataScopeId() {
808 let dataScopeId: DataScopeId;

Callers 2

toggleableSearchMethod · 0.95
renderMethod · 0.95

Calls 2

getBestDataScopeIdMethod · 0.95

Tested by

no test coverage detected