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

[ML] Transforms/DFA: Render EuiDataGrid for more than 0 rows. #156403

Conversation

walterra
Copy link
Contributor

@walterra walterra commented May 2, 2023

Summary

Part of #148228.

Fixes the React dev mode warning "Warning: Can't perform a React state update on an unmounted component." by only rendering EuiDataGrid if there's more than 0 rows.

Checklist

@walterra walterra added bug Fixes for quality problems that affect the customer experience :ml release_note:skip Skip the PR/issue when compiling release notes v8.8.0 v8.9.0 labels May 2, 2023
@walterra walterra self-assigned this May 2, 2023
@walterra walterra requested a review from a team as a code owner May 2, 2023 14:47
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

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
ml 3.4MB 3.4MB +5.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
securitySolution 398 401 +3
total +5

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
securitySolution 478 481 +3
total +5

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

cc @walterra

Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 left a comment

Choose a reason for hiding this comment

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

LGTM ⚡

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

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

LGTM. Tested and confirmed that the React warning is no longer displayed.

@walterra walterra merged commit 3f52ff6 into elastic:main May 3, 2023
@walterra walterra deleted the ml-148228-react-dev-error-unmounte-state-update branch May 3, 2023 10:22
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.8

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request May 3, 2023
…c#156403)

Fixes the React dev mode warning "Warning: Can't perform a React state
update on an unmounted component." by only rendering `EuiDataGrid` if
there's more than 0 rows.

(cherry picked from commit 3f52ff6)
kibanamachine added a commit that referenced this pull request May 3, 2023
…156403) (#156503)

# Backport

This will backport the following commits from `main` to `8.8`:
- [[ML] Transforms/DFA: Render EuiDataGrad for more than 0 rows.
(#156403)](#156403)

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

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

<!--BACKPORT [{"author":{"name":"Walter
Rafelsberger","email":"walter.rafelsberger@elastic.co"},"sourceCommit":{"committedDate":"2023-05-03T10:22:39Z","message":"[ML]
Transforms/DFA: Render EuiDataGrad for more than 0 rows.
(#156403)\n\nFixes the React dev mode warning \"Warning: Can't perform a
React state\r\nupdate on an unmounted component.\" by only rendering
`EuiDataGrid` if\r\nthere's more than 0
rows.","sha":"3f52ff6fceddbce0d538dce410e734b2131b4eb3","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug",":ml","release_note:skip","v8.8.0","v8.9.0"],"number":156403,"url":"#156403
Transforms/DFA: Render EuiDataGrad for more than 0 rows.
(#156403)\n\nFixes the React dev mode warning \"Warning: Can't perform a
React state\r\nupdate on an unmounted component.\" by only rendering
`EuiDataGrid` if\r\nthere's more than 0
rows.","sha":"3f52ff6fceddbce0d538dce410e734b2131b4eb3"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"#156403
Transforms/DFA: Render EuiDataGrad for more than 0 rows.
(#156403)\n\nFixes the React dev mode warning \"Warning: Can't perform a
React state\r\nupdate on an unmounted component.\" by only rendering
`EuiDataGrid` if\r\nthere's more than 0
rows.","sha":"3f52ff6fceddbce0d538dce410e734b2131b4eb3"}}]}] BACKPORT-->

Co-authored-by: Walter Rafelsberger <walter.rafelsberger@elastic.co>
@walterra walterra changed the title [ML] Transforms/DFA: Render EuiDataGrad for more than 0 rows. [ML] Transforms/DFA: Render EuiDataGrid for more than 0 rows. Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience :ml release_note:skip Skip the PR/issue when compiling release notes v8.8.0 v8.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants