Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Security Solution] Fix expand hover action in data grid #108616

Merged
merged 2 commits into from
Aug 16, 2021

Conversation

angorayc
Copy link
Contributor

@angorayc angorayc commented Aug 13, 2021

Summary

This PR is to Fix expand hover action in data grid.

Before:
Screenshot 2021-08-16 at 11 32 04

After fixed:
Screenshot 2021-08-14 at 00 16 30

  1. enable tgrid in x-pack/plugins/security_solution/common/experimental_features.ts line 17
  2. go to alerts table, and trigger any hover action in the table
  3. clicking on expand icon, the popover should display properly

@angorayc angorayc added v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Team:Threat Hunting Security Solution Threat Hunting Team v7.15.0 labels Aug 13, 2021
@angorayc angorayc requested a review from a team as a code owner August 13, 2021 23:22
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting (Team:Threat Hunting)

@angorayc
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
timelines 391.8KB 391.8KB +79.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@angorayc angorayc added the auto-backport Deprecated - use backport:version if exact versions are needed label Aug 16, 2021
Copy link
Member

@machadoum machadoum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Great fix!

const rowData = rowIndex < data.length ? data[rowIndex].data : null;
const header = columnHeaders.find((h) => h.id === columnId);
const eventId = rowIndex < data.length ? data[rowIndex]._id : null;

addBuildingBlockStyle(data[rowIndex].ecs, theme, setCellProps);
useEffect(() => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing it!

},
[columnHeaders, data, id, renderCellValue, tabType, theme, browserFields, rowRenderers]
);
}) as React.ReactElement;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this type coercion is misleading. But I don't know a good way of converting a ReacElement to a ReactNode. Ideally, EuiDataGrid renderCellValue prop should have the same type as t-grid renderCellValue. But that would be a massive change for this PR.

@angorayc angorayc merged commit fc3b3cc into elastic:master Aug 16, 2021
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Aug 16, 2021
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Aug 16, 2021
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Angela Chuang <6295984+angorayc@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:Threat Hunting Security Solution Threat Hunting Team v7.15.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants