-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Lens] Fixes error on table when there is no data #161953
Conversation
Pinging @elastic/kibana-visualizations @elastic/kibana-visualizations-external (Team:Visualizations) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great. Love that you added a test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
@@ -118,7 +118,7 @@ function updateColumnArgs( | |||
) { | |||
args.columns = [...bucketsColumnArgs]; | |||
// add first column from each group, then add second column for each group, ... | |||
transposedColumnGroups[0].forEach((_, index) => { | |||
transposedColumnGroups[0]?.forEach((_, index) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is exactly why we enabled noUncheckedIndexedAccess
in elastic/elastic-charts#2006
I don't know why typescript excluded this flag from strict mode
when this is clearly an undefined
union.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could consider adding this setting just for our code... it makes sense to me
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
## Summary Closes elastic#161948 Fixes the bug described in the issue. The bug is happening only for the table viz. <img width="1664" alt="image" src="https://github.com/elastic/kibana/assets/17003240/9646edcc-005d-4d2c-919a-097a673d730e"> ### Checklist - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios (cherry picked from commit 6550793)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
## Summary Closes elastic#161948 Fixes the bug described in the issue. The bug is happening only for the table viz. <img width="1664" alt="image" src="https://github.com/elastic/kibana/assets/17003240/9646edcc-005d-4d2c-919a-097a673d730e"> ### Checklist - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios (cherry picked from commit 6550793)
…62020) # Backport This will backport the following commits from `main` to `8.9`: - [[Lens] Fixes error on table when there is no data (#161953)](#161953) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Stratoula Kalafateli","email":"efstratia.kalafateli@elastic.co"},"sourceCommit":{"committedDate":"2023-07-17T07:45:22Z","message":"[Lens] Fixes error on table when there is no data (#161953)\n\n## Summary\r\n\r\nCloses https://github.com/elastic/kibana/issues/161948\r\n\r\nFixes the bug described in the issue. The bug is happening only for the\r\ntable viz.\r\n\r\n<img width=\"1664\" alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/17003240/9646edcc-005d-4d2c-919a-097a673d730e\">\r\n\r\n\r\n### Checklist\r\n\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"6550793b4fe793ad53072bddc51118e43414e7ad","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Visualizations","Feature:Lens","backport:prev-MAJOR","v8.10.0","v7.17.12"],"number":161953,"url":"https://github.com/elastic/kibana/pull/161953","mergeCommit":{"message":"[Lens] Fixes error on table when there is no data (#161953)\n\n## Summary\r\n\r\nCloses https://github.com/elastic/kibana/issues/161948\r\n\r\nFixes the bug described in the issue. The bug is happening only for the\r\ntable viz.\r\n\r\n<img width=\"1664\" alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/17003240/9646edcc-005d-4d2c-919a-097a673d730e\">\r\n\r\n\r\n### Checklist\r\n\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"6550793b4fe793ad53072bddc51118e43414e7ad"}},"sourceBranch":"main","suggestedTargetBranches":["7.17"],"targetPullRequestStates":[{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/161953","number":161953,"mergeCommit":{"message":"[Lens] Fixes error on table when there is no data (#161953)\n\n## Summary\r\n\r\nCloses https://github.com/elastic/kibana/issues/161948\r\n\r\nFixes the bug described in the issue. The bug is happening only for the\r\ntable viz.\r\n\r\n<img width=\"1664\" alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/17003240/9646edcc-005d-4d2c-919a-097a673d730e\">\r\n\r\n\r\n### Checklist\r\n\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"6550793b4fe793ad53072bddc51118e43414e7ad"}},{"branch":"7.17","label":"v7.17.12","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
…162018) # Backport This will backport the following commits from `main` to `7.17`: - [[Lens] Fixes error on table when there is no data (#161953)](#161953) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Stratoula Kalafateli","email":"efstratia.kalafateli@elastic.co"},"sourceCommit":{"committedDate":"2023-07-17T07:45:22Z","message":"[Lens] Fixes error on table when there is no data (#161953)\n\n## Summary\r\n\r\nCloses https://github.com/elastic/kibana/issues/161948\r\n\r\nFixes the bug described in the issue. The bug is happening only for the\r\ntable viz.\r\n\r\n<img width=\"1664\" alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/17003240/9646edcc-005d-4d2c-919a-097a673d730e\">\r\n\r\n\r\n### Checklist\r\n\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"6550793b4fe793ad53072bddc51118e43414e7ad","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Visualizations","Feature:Lens","backport:prev-MAJOR","v8.10.0","v7.17.12"],"number":161953,"url":"https://github.com/elastic/kibana/pull/161953","mergeCommit":{"message":"[Lens] Fixes error on table when there is no data (#161953)\n\n## Summary\r\n\r\nCloses https://github.com/elastic/kibana/issues/161948\r\n\r\nFixes the bug described in the issue. The bug is happening only for the\r\ntable viz.\r\n\r\n<img width=\"1664\" alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/17003240/9646edcc-005d-4d2c-919a-097a673d730e\">\r\n\r\n\r\n### Checklist\r\n\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"6550793b4fe793ad53072bddc51118e43414e7ad"}},"sourceBranch":"main","suggestedTargetBranches":["7.17"],"targetPullRequestStates":[{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/161953","number":161953,"mergeCommit":{"message":"[Lens] Fixes error on table when there is no data (#161953)\n\n## Summary\r\n\r\nCloses https://github.com/elastic/kibana/issues/161948\r\n\r\nFixes the bug described in the issue. The bug is happening only for the\r\ntable viz.\r\n\r\n<img width=\"1664\" alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/17003240/9646edcc-005d-4d2c-919a-097a673d730e\">\r\n\r\n\r\n### Checklist\r\n\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"6550793b4fe793ad53072bddc51118e43414e7ad"}},{"branch":"7.17","label":"v7.17.12","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Summary
Closes #161948
Fixes the bug described in the issue. The bug is happening only for the table viz.
Checklist