diff options
| author | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-08-30 14:45:09 +0530 |
|---|---|---|
| committer | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-08-30 14:45:09 +0530 |
| commit | 94a6e1dd09a0460c96eb4670e1d2efbd71a43873 (patch) | |
| tree | c189b78b18a3baa004e067d8d1604cb92c9b6aa1 /src/client/views/search | |
| parent | 204c978c09ef749c02e43604966d861c79b6f5ed (diff) | |
| parent | e8856332c19abe12fe43c940e35b49ab77aae612 (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into acls_uv
Diffstat (limited to 'src/client/views/search')
| -rw-r--r-- | src/client/views/search/SearchBox.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/search/SearchBox.tsx b/src/client/views/search/SearchBox.tsx index 7e233ecbb..3926208ae 100644 --- a/src/client/views/search/SearchBox.tsx +++ b/src/client/views/search/SearchBox.tsx @@ -492,7 +492,7 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc } render() { - const myDashboards = DocListCast(Cast(Doc.UserDoc().myDashboards, Doc, null).data); + const myDashboards = DocListCast(CurrentUserUtils.MyDashboards.data); return ( <div style={{ pointerEvents: "all" }} className="searchBox-container"> <div style={{ position: "absolute", left: 15, height: 32, alignItems: "center", display: "flex" }}> @@ -507,7 +507,7 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc </div> <div className="searchBox-lozenge-dashboard" > <select className="searchBox-dashSelect" onChange={e => CurrentUserUtils.openDashboard(Doc.UserDoc(), myDashboards[Number(e.target.value)])} - value={myDashboards.indexOf(Cast(Doc.UserDoc().activeDashboard, Doc, null)!)}> + value={myDashboards.indexOf(CurrentUserUtils.ActiveDashboard)}> {myDashboards.map((dash, i) => <option key={dash[Id]} value={i}> {StrCast(dash.title)} </option>)} </select> <div className="searchBox-dashboards" onClick={undoBatch(() => CurrentUserUtils.createNewDashboard(Doc.UserDoc()))}> |
