Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions packages/kbn-unified-data-table/src/components/data_table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1155,8 +1155,6 @@ export const UnifiedDataTable = ({
/>
) : (
<EuiDataGridMemoized
// Using this as the `key` is a workaround for https://github.com/elastic/eui/issues/7962. This forces a re-render if the density is changed.
key={dataGridDensity}
id={dataGridId}
aria-describedby={randomId}
aria-labelledby={ariaLabelledBy}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await dataGrid.changeDensityValue('Normal');

// toggle the popover
// Right now changing the density closes the popover (see packages/kbn-unified-data-table/src/components/data_table.tsx:1144)
// When that workaround is removed we will need to uncomment this next line
// await dataGrid.clickGridSettings();
await dataGrid.clickGridSettings();
await dataGrid.clickGridSettings();
expect(await dataGrid.getCurrentDensityValue()).to.be('Normal');
});

it('should persist the density selection after reloading the page', async () => {
await dataGrid.clickGridSettings();
await dataGrid.changeDensityValue('Expanded');
await dataGrid.clickGridSettings();
expect(await dataGrid.getCurrentDensityValue()).to.be('Expanded');

await browser.refresh();
Expand Down