mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[8.11] [Cloud Security] set rowHeight to 0 to fix the bug of large row height in Findings (#170503) (#170587)
# Backport This will backport the following commits from `main` to `8.11`: - [[Cloud Security] set rowHeight to 0 to fix the bug of large row height in Findings (#170503)](https://github.com/elastic/kibana/pull/170503) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Maxim Kholod","email":"maxim.kholod@elastic.co"},"sourceCommit":{"committedDate":"2023-11-04T14:26:33Z","message":"[Cloud Security] set rowHeight to 0 to fix the bug of large row height in Findings (#170503)\n\n## Summary\r\n\r\nfixes\r\n- https://github.com/elastic/kibana/issues/170502\r\n\r\ndefaulting to row height 0 for the findings table. As the default was -1\r\nbefore, we were defaulting to 0, but due to this change\r\nhttps://github.com/elastic/kibana/pull/169724/files the default became\r\n3, which broke our table. I guess the logic of taking the UI setting if\r\nit's differnt from default -1 was to cater for users changing the row\r\nheight somewhere in the settings, but we need to bring to product/design\r\nto see if we want to support it\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"5b72f77e078ecde5754161c8ba23f1ce63cfeb9f","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Cloud Security","backport:prev-minor","v8.12.0"],"number":170503,"url":"https://github.com/elastic/kibana/pull/170503","mergeCommit":{"message":"[Cloud Security] set rowHeight to 0 to fix the bug of large row height in Findings (#170503)\n\n## Summary\r\n\r\nfixes\r\n- https://github.com/elastic/kibana/issues/170502\r\n\r\ndefaulting to row height 0 for the findings table. As the default was -1\r\nbefore, we were defaulting to 0, but due to this change\r\nhttps://github.com/elastic/kibana/pull/169724/files the default became\r\n3, which broke our table. I guess the logic of taking the UI setting if\r\nit's differnt from default -1 was to cater for users changing the row\r\nheight somewhere in the settings, but we need to bring to product/design\r\nto see if we want to support it\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"5b72f77e078ecde5754161c8ba23f1ce63cfeb9f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/170503","number":170503,"mergeCommit":{"message":"[Cloud Security] set rowHeight to 0 to fix the bug of large row height in Findings (#170503)\n\n## Summary\r\n\r\nfixes\r\n- https://github.com/elastic/kibana/issues/170502\r\n\r\ndefaulting to row height 0 for the findings table. As the default was -1\r\nbefore, we were defaulting to 0, but due to this change\r\nhttps://github.com/elastic/kibana/pull/169724/files the default became\r\n3, which broke our table. I guess the logic of taking the UI setting if\r\nit's differnt from default -1 was to cater for users changing the row\r\nheight somewhere in the settings, but we need to bring to product/design\r\nto see if we want to support it\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"5b72f77e078ecde5754161c8ba23f1ce63cfeb9f"}}]}] BACKPORT--> Co-authored-by: Maxim Kholod <maxim.kholod@elastic.co>
This commit is contained in:
parent
f2ea0c43ec
commit
42cd5ad661
1 changed files with 2 additions and 7 deletions
|
@ -9,11 +9,7 @@ import { UnifiedDataTableSettings, useColumns } from '@kbn/unified-data-table';
|
|||
import { type DataView } from '@kbn/data-views-plugin/common';
|
||||
import { UnifiedDataTable, DataLoadingState } from '@kbn/unified-data-table';
|
||||
import { CellActionsProvider } from '@kbn/cell-actions';
|
||||
import {
|
||||
ROW_HEIGHT_OPTION,
|
||||
SHOW_MULTIFIELDS,
|
||||
SORT_DEFAULT_ORDER_SETTING,
|
||||
} from '@kbn/discover-utils';
|
||||
import { SHOW_MULTIFIELDS, SORT_DEFAULT_ORDER_SETTING } from '@kbn/discover-utils';
|
||||
import { DataTableRecord } from '@kbn/discover-utils/types';
|
||||
import { EuiDataGridCellValueElementProps, EuiDataGridStyle, EuiProgress } from '@elastic/eui';
|
||||
import { AddFieldFilterHandler } from '@kbn/unified-field-list';
|
||||
|
@ -223,8 +219,7 @@ export const CloudSecurityDataTable = ({
|
|||
height: `calc(100vh - ${filters.length > 0 ? 443 : 403}px)`,
|
||||
};
|
||||
|
||||
const rowHeightState =
|
||||
uiSettings.get(ROW_HEIGHT_OPTION) === -1 ? 0 : uiSettings.get(ROW_HEIGHT_OPTION);
|
||||
const rowHeightState = 0;
|
||||
|
||||
const loadingStyle = {
|
||||
opacity: isLoading ? 1 : 0,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue