Search: Bring back open search by clicking dashboard name (#24151)
(cherry picked from commit 4f81125af0)
This commit is contained in:
committed by
Arve Knudsen
parent
f9a8469c74
commit
1df9921666
@@ -106,6 +106,13 @@ class DashNav extends PureComponent<Props> {
|
||||
this.forceUpdate();
|
||||
};
|
||||
|
||||
onDashboardNameClick = () => {
|
||||
this.props.updateLocation({
|
||||
query: { search: 'open' },
|
||||
partial: true,
|
||||
});
|
||||
};
|
||||
|
||||
addCustomContent(actions: DashNavButtonModel[], buttons: ReactNode[]) {
|
||||
actions.map((action, index) => {
|
||||
const Component = action.component;
|
||||
@@ -186,7 +193,7 @@ class DashNav extends PureComponent<Props> {
|
||||
</a>
|
||||
</>
|
||||
)}
|
||||
<span>{dashboard.title}</span>
|
||||
<a onClick={this.onDashboardNameClick}>{dashboard.title}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div className="navbar-buttons navbar-buttons--actions">{this.renderLeftActionsButton()}</div>
|
||||
|
||||
Reference in New Issue
Block a user