Skip to content

Commit

Permalink
[8.15] [Search] Stop rerendering connector pages unnecessarily (#189103
Browse files Browse the repository at this point in the history
…) (#189179)

# Backport

This will backport the following commits from `main` to `8.15`:
- [[Search] Stop rerendering connector pages unnecessarily
(#189103)](#189103)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Sander
Philipse","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-07-25T12:29:02Z","message":"[Search]
Stop rerendering connector pages unnecessarily (#189103)\n\n##
Summary\r\n\r\nThis stops the connector tabs from incessantly
re-rendering.","sha":"a35d3178a81f3ff6f9f2b06800ec02a5d7d84ceb","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v8.15.0","v8.16.0","v8.14.4"],"title":"[Search]
Stop rerendering connector pages
unnecessarily","number":189103,"url":"https://github.com/elastic/kibana/pull/189103","mergeCommit":{"message":"[Search]
Stop rerendering connector pages unnecessarily (#189103)\n\n##
Summary\r\n\r\nThis stops the connector tabs from incessantly
re-rendering.","sha":"a35d3178a81f3ff6f9f2b06800ec02a5d7d84ceb"}},"sourceBranch":"main","suggestedTargetBranches":["8.15","8.14"],"targetPullRequestStates":[{"branch":"8.15","label":"v8.15.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/189103","number":189103,"mergeCommit":{"message":"[Search]
Stop rerendering connector pages unnecessarily (#189103)\n\n##
Summary\r\n\r\nThis stops the connector tabs from incessantly
re-rendering.","sha":"a35d3178a81f3ff6f9f2b06800ec02a5d7d84ceb"}},{"branch":"8.14","label":"v8.14.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Sander Philipse <[email protected]>
  • Loading branch information
kibanamachine and sphilipse authored Jul 25, 2024
1 parent bd51600 commit 0c1dea0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import React, { useEffect } from 'react';
import React, { useEffect, useMemo } from 'react';
import { useParams } from 'react-router-dom';

import { useActions, useValues } from 'kea';
Expand Down Expand Up @@ -236,7 +236,7 @@ export const ConnectorDetail: React.FC = () => {
...CONFIG_TAB,
];

const selectedTab = tabs.find((tab) => tab.id === tabId);
const selectedTab = useMemo(() => tabs.find((tab) => tab.id === tabId), [tabId]);

return (
<EnterpriseSearchContentPageTemplate
Expand Down

0 comments on commit 0c1dea0

Please sign in to comment.