Skip to content

Commit

Permalink
Upgrade to EUI v40.1.0 (#116692)
Browse files Browse the repository at this point in the history
* Upgrade EUI to v40.1.0

* [Discover] Remove temp fix + update snapshot

* Fix deprecated `popperPlacement` prop

* Update test snapshots with table cell change

Co-authored-by: Uladzislau Lasitsa <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
3 people authored Nov 1, 2021
1 parent f5f1208 commit 80ef314
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 88 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"@elastic/datemath": "link:bazel-bin/packages/elastic-datemath",
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@^8.0.0-canary.35",
"@elastic/ems-client": "8.0.0",
"@elastic/eui": "40.0.0",
"@elastic/eui": "40.1.0",
"@elastic/filesaver": "1.1.2",
"@elastic/maki": "6.3.0",
"@elastic/node-crypto": "1.2.1",
Expand Down
2 changes: 1 addition & 1 deletion src/dev/license_checker/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,6 @@ export const LICENSE_OVERRIDES = {
'[email protected]': ['Eclipse Distribution License - v 1.0'], // cf. https://github.com/bjornharrtell/jsts
'@mapbox/[email protected]': ['MIT'], // license in readme https://github.com/tmcw/jsonlint
'@elastic/[email protected]': ['Elastic License 2.0'],
'@elastic/eui@40.0.0': ['SSPL-1.0 OR Elastic License 2.0'],
'@elastic/eui@40.1.0': ['SSPL-1.0 OR Elastic License 2.0'],
'[email protected]': ['CC-BY-4.0'], // retired ODC‑By license https://github.com/mattcg/language-subtag-registry
};

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

import React, { memo, useCallback, useMemo, useEffect, useState, useRef } from 'react';
import React, { memo, useCallback, useMemo } from 'react';
import { EuiDataGrid, EuiDataGridProps, EuiDataGridSorting, EuiTitle } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { orderBy } from 'lodash';
Expand Down Expand Up @@ -111,26 +111,6 @@ export const TableVisBasic = memo(
[columns, setColumnsWidth]
);

const firstRender = useRef(true);
const [dataGridUpdateCounter, setDataGridUpdateCounter] = useState(0);

// key was added as temporary solution to force re-render if we change autoFitRowToContent or we get new data
// cause we have problem with correct updating height cache in EUI datagrid when we use auto-height
// will be removed as soon as fix problem on EUI side
useEffect(() => {
// skip first render
if (firstRender.current) {
firstRender.current = false;
return;
}
// skip if auto height was turned off
if (!visConfig.autoFitRowToContent) {
return;
}
// update counter to remount grid from scratch
setDataGridUpdateCounter((counter) => counter + 1);
}, [visConfig.autoFitRowToContent, table, sort, pagination, columnsWidth]);

return (
<>
{title && (
Expand All @@ -139,7 +119,6 @@ export const TableVisBasic = memo(
</EuiTitle>
)}
<EuiDataGrid
key={String(dataGridUpdateCounter)}
aria-label={dataGridAriaLabel}
columns={gridColumns}
gridStyle={{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const WaffleTimeControls = withTheme(({ interval }: Props) => {
injectTimes={currentMoment ? [currentMoment] : []}
isLoading={isAutoReloading}
onChange={handleChangeDate}
popperPlacement="top-end"
popoverPlacement="top-end"
selected={currentMoment}
shouldCloseOnSelect
showTimeSelect
Expand Down
Loading

0 comments on commit 80ef314

Please sign in to comment.