[8.10] [Cloud Security] Fix first item flyout wont open in vuln table (#165214) (#165236)

# Backport

This will backport the following commits from `main` to `8.10`:
- [[Cloud Security] Fix first item flyout wont open in vuln table
(#165214)](https://github.com/elastic/kibana/pull/165214)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT
[{"author":{"name":"Jordan","email":"51442161+JordanSh@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-08-30T13:14:58Z","message":"[Cloud
Security] Fix first item flyout wont open in vuln table
(#165214)","sha":"b88547c323fb97dac9e08c4ccdf12ac4e5f0899d","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Cloud
Security","v8.10.0","v8.11.0"],"number":165214,"url":"https://github.com/elastic/kibana/pull/165214","mergeCommit":{"message":"[Cloud
Security] Fix first item flyout wont open in vuln table
(#165214)","sha":"b88547c323fb97dac9e08c4ccdf12ac4e5f0899d"}},"sourceBranch":"main","suggestedTargetBranches":["8.10"],"targetPullRequestStates":[{"branch":"8.10","label":"v8.10.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/165214","number":165214,"mergeCommit":{"message":"[Cloud
Security] Fix first item flyout wont open in vuln table
(#165214)","sha":"b88547c323fb97dac9e08c4ccdf12ac4e5f0899d"}}]}]
BACKPORT-->

Co-authored-by: Jordan <51442161+JordanSh@users.noreply.github.com>
This commit is contained in:
Kibana Machine 2023-08-30 10:27:04 -04:00 committed by GitHub
parent c0f616a887
commit 67f0f33fb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -281,9 +281,7 @@ const VulnerabilitiesDataGrid = ({
[pageSize, setUrlQuery]
);
const showVulnerabilityFlyout = flyoutVulnerabilityIndex
? flyoutVulnerabilityIndex > invalidIndex
: undefined;
const showVulnerabilityFlyout = flyoutVulnerabilityIndex > invalidIndex;
if (data?.page.length === 0) {
return <EmptyState onResetFilters={onResetFilters} />;