mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
* fix: Fix alert details table overflow
* fix: prevent table overflow
In 56a2e788ca
the `FormattedFieldValue`'s `truncate` prop default value was changed to `true`. This resulted in overflowing rows in the alert table because it was not set up to allow for ellipsed content. After syncing with design, it became clear that we do not want to shorten the visible content of the cells in the first place. So instead of shortening the content, the table cells will now retain their original behaviour and display all of the content.
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Jan Monschke <jan.monschke@elastic.co>
This commit is contained in:
parent
c61386b430
commit
aa005d4f24
4 changed files with 27 additions and 1 deletions
|
@ -5,7 +5,13 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { ALERT_FLYOUT, CELL_TEXT, JSON_TEXT, TABLE_ROWS } from '../../screens/alerts_details';
|
||||
import {
|
||||
ALERT_FLYOUT,
|
||||
CELL_TEXT,
|
||||
JSON_TEXT,
|
||||
TABLE_CONTAINER,
|
||||
TABLE_ROWS,
|
||||
} from '../../screens/alerts_details';
|
||||
|
||||
import {
|
||||
expandFirstAlert,
|
||||
|
@ -65,4 +71,20 @@ describe('Alert details with unmapped fields', () => {
|
|||
cy.get(CELL_TEXT).eq(4).should('have.text', expectedUnmmappedField.text);
|
||||
});
|
||||
});
|
||||
|
||||
// This test makes sure that the table does not overflow horizontally
|
||||
it('Table does not scroll horizontally', () => {
|
||||
openTable();
|
||||
|
||||
cy.get(ALERT_FLYOUT)
|
||||
.find(TABLE_CONTAINER)
|
||||
.within(($tableContainer) => {
|
||||
expect($tableContainer[0].scrollLeft).to.equal(0);
|
||||
|
||||
// Try to scroll left and make sure that the table hasn't actually scrolled
|
||||
$tableContainer[0].scroll({ left: 1000 });
|
||||
|
||||
expect($tableContainer[0].scrollLeft).to.equal(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -34,6 +34,8 @@ export const TABLE_CELL = '.euiTableRowCell';
|
|||
|
||||
export const TABLE_TAB = '[data-test-subj="tableTab"]';
|
||||
|
||||
export const TABLE_CONTAINER = '[data-test-subj="event-fields-browser"]';
|
||||
|
||||
export const TABLE_ROWS = '.euiTableRow';
|
||||
|
||||
export const THREAT_DETAILS_ACCORDION = '.euiAccordion__triggerWrapper';
|
||||
|
|
|
@ -281,6 +281,7 @@ export const EventFieldsBrowser = React.memo<Props>(
|
|||
rowProps={onSetRowProps}
|
||||
search={search}
|
||||
sorting={false}
|
||||
data-test-subj="event-fields-browser"
|
||||
/>
|
||||
</TableWrapper>
|
||||
);
|
||||
|
|
|
@ -72,6 +72,7 @@ export const FieldValueCell = React.memo(
|
|||
isObjectArray={data.isObjectArray}
|
||||
value={value}
|
||||
linkValue={(getLinkValue && getLinkValue(data.field)) ?? linkValue}
|
||||
truncate={false}
|
||||
/>
|
||||
)}
|
||||
</EuiFlexItem>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue