Skip to content

Commit

Permalink
Update ag-grid dependency to 31 (opensearch-project#1604)
Browse files Browse the repository at this point in the history
* Update ag-grid dependency versions

Signed-off-by: Simeon Widdis <sawiddis@amazon.com>

* Apply ag-grid migrations

Signed-off-by: Simeon Widdis <sawiddis@amazon.com>

* Fix grid status quoting

Signed-off-by: Simeon Widdis <sawiddis@amazon.com>

* Shuffle imports and update style import paths

Signed-off-by: Simeon Widdis <sawiddis@amazon.com>

---------

Signed-off-by: Simeon Widdis <sawiddis@amazon.com>
  • Loading branch information
Swiddis authored Mar 25, 2024
1 parent 8f7950f commit 3817476
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
]
},
"dependencies": {
"@ag-grid-community/styles": "^31.2.0",
"@algolia/autocomplete-core": "^1.4.1",
"@algolia/autocomplete-theme-classic": "^1.2.1",
"@nteract/outputs": "^3.0.11",
"@nteract/presentational-components": "^3.4.3",
"@reduxjs/toolkit": "^1.6.1",
"ag-grid-community": "^27.3.0",
"ag-grid-react": "^27.3.0",
"ag-grid-react": "^31.2.0",
"ajv": "^8.11.0",
"antlr4": "4.8.0",
"antlr4ts": "^0.5.0-alpha.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui';

// ag-data-grid
import { AgGridReact } from 'ag-grid-react';
import 'ag-grid-community/dist/styles/ag-grid.css';
import 'ag-grid-community/dist/styles/ag-theme-alpine.css';
import '@ag-grid-community/styles/ag-grid.css';
import '@ag-grid-community/styles/ag-theme-alpine.css';

// grid elements
import { CustomOverlay, RowConfigType, GridHeader } from './data_table_header';
Expand All @@ -18,7 +18,6 @@ import { GridFooter } from './data_table_footer';
// constants
import { COLUMN_DEFAULT_MIN_WIDTH, HEADER_HEIGHT } from '../../../../../common/constants/explorer';
import { IVisualizationContainerProps, IField } from '../../../../../common/types/explorer';
import 'ag-grid-community/dist/styles/ag-theme-alpine-dark.css';

// styles
import './data_table.scss';
Expand Down Expand Up @@ -131,11 +130,11 @@ export const DataTable = ({ visualizations, layout, config }: any) => {
const onPageSizeChanged = useCallback(
(val: number) => {
setPageSize(val);
gridRef.current.api.paginationSetPageSize(val);
gridRef.current.api.setGridOption('paginationPageSize', val);
setActivePage(0);
gridRef.current.api.paginationGoToPage(0);
if (isFullScreen) {
gridRefFullScreen.current.api.paginationSetPageSize(val);
gridRefFullScreen.current.api.setGridOption('paginationPageSize', val);
gridRefFullScreen.current.api.paginationGoToPage(0);
}
},
Expand Down
22 changes: 14 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
# yarn lockfile v1


"@ag-grid-community/styles@^31.2.0":
version "31.2.0"
resolved "https://registry.yarnpkg.com/@ag-grid-community/styles/-/styles-31.2.0.tgz#7605338f2e0f3a3c2e7952f0e96360600033316c"
integrity sha512-fU6wDpK0//dJLp5pwojuTUQPi4nVZ4iTBF1yaQw+6NXeGi0ma7rz7IOS6Idw0XXE3ELKGTuO7QUJmxxdL7kykw==

"@algolia/autocomplete-core@^1.4.1":
version "1.11.0"
resolved "https://registry.yarnpkg.com/@algolia/autocomplete-core/-/autocomplete-core-1.11.0.tgz#9db68f2aa38fe3149507d214082a1926b6b91fac"
Expand Down Expand Up @@ -354,16 +359,17 @@ acorn@^7.1.1:
resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa"
integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==

ag-grid-community@^27.3.0:
version "27.3.0"
resolved "https://registry.yarnpkg.com/ag-grid-community/-/ag-grid-community-27.3.0.tgz#b1e94a58026aaf2f0cd7920e35833325b5e762c7"
integrity sha512-R5oZMXEHXnOLrmhn91J8lR0bv6IAnRcU6maO+wKLMJxffRWaAYFAuw1jt7bdmcKCv8c65F6LEBx4ykSOALa9vA==
ag-grid-community@31.2.0:
version "31.2.0"
resolved "https://registry.yarnpkg.com/ag-grid-community/-/ag-grid-community-31.2.0.tgz#376f07a3a7dd5c87d8cb6f660e4e338ec70663d1"
integrity sha512-Ija6X171Iq3mFZASZlriQIIdEFqA71rZIsjQD6KHy5lMmxnoseZTX2neThBav1gvr6SA6n5B2PD6eUHdZnrUfw==

ag-grid-react@^27.3.0:
version "27.3.0"
resolved "https://registry.yarnpkg.com/ag-grid-react/-/ag-grid-react-27.3.0.tgz#fe06647653f8b0b349b8e613aab8ea2e07915562"
integrity sha512-2bs9YfJ/shvBZQLLjny4NFvht+ic6VtpTPO0r3bHHOhlL3Fjx2rGvS6AHSwfvu+kJacHCta30PjaEbX8T3UDyw==
ag-grid-react@^31.2.0:
version "31.2.0"
resolved "https://registry.yarnpkg.com/ag-grid-react/-/ag-grid-react-31.2.0.tgz#c3e90edd4ccac3fbb113b657ad6192bc2d85e314"
integrity sha512-ObFdPmF3EC7/xWZX8NjrZjURePyFa72MWjb1ZgUqDP7Wq09OSXXyKBN1qXmfUIT3h4o5+os6tCQEqoo7Op+3ZA==
dependencies:
ag-grid-community "31.2.0"
prop-types "^15.8.1"

aggregate-error@^3.0.0:
Expand Down

0 comments on commit 3817476

Please sign in to comment.