Skip to content

Commit 3254c62

Browse files
Fix a bug where header actions disappearing
There was a bug where changing routes would cause the header action, in the case of Workplace Search the “Go to search application” link, to disappear on route changes. Turns out that we didn’t need it in the useEffect and that moving it out keeps the unmount from removing the link from the header.
1 parent efc9a05 commit 3254c62

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

x-pack/plugins/enterprise_search/public/applications/workplace_search/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,11 @@ export const WorkplaceSearchConfigured: React.FC<IInitialAppData> = (props) => {
3838
useEffect(() => {
3939
if (!hasInitialized) {
4040
initializeAppData(props);
41-
renderHeaderActions(WorkplaceSearchHeaderActions);
4241
}
4342
}, [hasInitialized]);
4443

44+
renderHeaderActions(WorkplaceSearchHeaderActions);
45+
4546
return (
4647
<Switch>
4748
<Route path={SETUP_GUIDE_PATH}>

0 commit comments

Comments
 (0)