Skip to content

Commit

Permalink
Fix navigation bug from dashboard to dashboard (#5435)
Browse files Browse the repository at this point in the history
Previously navigating from one dashboard to another dashboard do not work. This PR adds a dashboard id as a prop to pass into the <DashboardViewPort> component in order to force react to re-render every time it receives a new id.

Resolve the following issues:
* #4694
* https://github.com/opensearch-project/Open and Search-Dashboards/issues/4819

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>

(cherry picked from commit 1de8be6)
Signed-off-by: Miki <miki@amazon.com>
  • Loading branch information
AMoo-Miki committed Nov 15, 2023
1 parent fbee3cd commit 662b3ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ export class DashboardContainer extends Container<InheritedChildInput, Dashboard
<I18nProvider>
<OpenSearchDashboardsContextProvider services={this.options}>
<DashboardViewport
key={this.id}
renderEmpty={this.renderEmpty}
container={this}
PanelComponent={this.embeddablePanel}
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12936,7 +12936,7 @@ nan@^2.12.1:
resolved "https://registry.yarnpkg.com/nan/-/nan-2.15.0.tgz#3f34a473ff18e15c1b5626b62903b5ad6e665fee"
integrity sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==

nan@^2.15.0, nan@^2.17.0:
nan@^2.17.0:
version "2.17.0"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.17.0.tgz#c0150a2368a182f033e9aa5195ec76ea41a199cb"
integrity sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==
Expand Down

0 comments on commit 662b3ea

Please sign in to comment.