Skip to content

Commit 37a164c

Browse files
- Rebase pgadmin-org/react-data-grid fork to latest.
- Fixed an issue where data output column resize is not sticking in Safari. #8504
1 parent c20d035 commit 37a164c

File tree

6 files changed

+23
-28
lines changed

6 files changed

+23
-28
lines changed

web/jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ module.exports = {
5252
],
5353
'testEnvironment': 'jsdom',
5454
'transformIgnorePatterns': [
55-
'[/\\\\]node_modules[/\\\\](?!react-dnd|dnd-core|@react-dnd|react-resize-detector).+\\.(js|jsx|mjs|cjs|ts|tsx)$',
55+
'[/\\\\]node_modules[/\\\\](?!react-dnd|dnd-core|@react-dnd|react-resize-detector|react-data-grid).+\\.(js|jsx|mjs|cjs|ts|tsx)$',
5656
'^.+\\.module\\.(css|sass|scss)$'
5757
]
5858
};

web/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
"@babel/preset-env": "^7.28.0",
1717
"@babel/preset-typescript": "^7.24.7",
1818
"@emotion/memoize": "^0.9.0",
19-
"@emotion/react": "^11.11.3",
20-
"@emotion/styled": "^11.11.0",
19+
"@emotion/react": "^11.14.0",
20+
"@emotion/styled": "^11.14.1",
2121
"@emotion/utils": "^1.0.0",
2222
"@svgr/webpack": "^8.1.0",
2323
"@testing-library/dom": "10.4.1",
@@ -129,7 +129,7 @@
129129
"react-arborist": "^3.2.0",
130130
"react-aspen": "^1.1.0",
131131
"react-checkbox-tree": "^1.7.2",
132-
"react-data-grid": "https://github.com/pgadmin-org/react-data-grid.git#3dfc2ca01a046d55c1c7a45392dcec104815dc76",
132+
"react-data-grid": "https://github.com/pgadmin-org/react-data-grid.git#8ddaa7bed99c8329e39b8ff37ba156f7fc8e85d4",
133133
"react-dnd": "^16.0.1",
134134
"react-dnd-html5-backend": "^16.0.1",
135135
"react-dom": "^19.0.0",

web/pgadmin/static/js/components/PgReactDataGrid.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//
88
//////////////////////////////////////////////////////////////
99
import React, { useCallback, useContext, useEffect, useMemo } from 'react';
10-
import ReactDataGrid, { Row } from 'react-data-grid';
10+
import { DataGrid, Row } from 'react-data-grid';
1111
import { Box } from '@mui/material';
1212
import PropTypes from 'prop-types';
1313
import CustomPropTypes from '../custom_prop_types';
@@ -16,7 +16,7 @@ import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
1616
import gettext from 'sources/gettext';
1717
import { styled } from '@mui/material/styles';
1818

19-
const StyledReactDataGrid = styled(ReactDataGrid)(({theme})=>({
19+
const StyledReactDataGrid = styled(DataGrid)(({theme})=>({
2020
'&.ReactGrid-root': {
2121
height: '100%',
2222
color: theme.palette.text.primary,

web/pgadmin/tools/sqleditor/static/js/components/QueryToolDataGrid/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ export default function QueryToolDataGrid({columns, rows, totalRowCount, dataCha
395395
newSelectedCols.add(i);
396396
}
397397
}
398-
398+
399399
props.onSelectedRowsChange(new Set());
400400
setLastSelectedColumn(columnIdx);
401401
onSelectedColumnsChange(newSelectedCols);
@@ -482,9 +482,9 @@ export default function QueryToolDataGrid({columns, rows, totalRowCount, dataCha
482482

483483
// This is needed to prevent Codemirror from triggering copy.
484484
if(mode == 'SELECT' && (e.ctrlKey || e.metaKey) && e.key !== 'Control' && e.keyCode == 67) {
485-
// taken care by handleCopy.
486485
e.preventDefault();
487486
e.stopPropagation();
487+
handleCopy();
488488
}
489489
}}
490490
{...props}

web/regression/javascript/__mocks__/react-data-grid.jsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import { useRef } from 'react';
22
import PropTypes from 'prop-types';
33
export * from 'react-data-grid';
44

5-
6-
const ReactDataGrid = (
5+
export const DataGrid = (
76
{
87
ref: _ref,
98
...props
@@ -13,9 +12,7 @@ const ReactDataGrid = (
1312
return <div id={props.id} ref={ele} data-test="react-data-grid"/>;
1413
};
1514

16-
ReactDataGrid.displayName = 'ReactDataGrid';
17-
ReactDataGrid.propTypes = {
15+
DataGrid.displayName = 'DataGrid';
16+
DataGrid.propTypes = {
1817
id: PropTypes.any
1918
};
20-
21-
export default ReactDataGrid;

web/yarn.lock

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1757,7 +1757,7 @@ __metadata:
17571757
languageName: node
17581758
linkType: hard
17591759

1760-
"@emotion/react@npm:^11.11.1, @emotion/react@npm:^11.11.3, @emotion/react@npm:^11.8.1":
1760+
"@emotion/react@npm:^11.11.1, @emotion/react@npm:^11.14.0, @emotion/react@npm:^11.8.1":
17611761
version: 11.14.0
17621762
resolution: "@emotion/react@npm:11.14.0"
17631763
dependencies:
@@ -1798,7 +1798,7 @@ __metadata:
17981798
languageName: node
17991799
linkType: hard
18001800

1801-
"@emotion/styled@npm:^11.*, @emotion/styled@npm:^11.11.0":
1801+
"@emotion/styled@npm:^11.*, @emotion/styled@npm:^11.11.0, @emotion/styled@npm:^11.14.1":
18021802
version: 11.14.1
18031803
resolution: "@emotion/styled@npm:11.14.1"
18041804
dependencies:
@@ -5824,7 +5824,7 @@ __metadata:
58245824
languageName: node
58255825
linkType: hard
58265826

5827-
"clsx@npm:^2.0.0, clsx@npm:^2.1.1":
5827+
"clsx@npm:^2.1.1":
58285828
version: 2.1.1
58295829
resolution: "clsx@npm:2.1.1"
58305830
checksum: 10c0/c4c8eb865f8c82baab07e71bfa8897c73454881c4f99d6bc81585aecd7c441746c1399d08363dc096c550cceaf97bd4ce1e8854e1771e9998d9f94c4fe075839
@@ -12145,15 +12145,13 @@ __metadata:
1214512145
languageName: node
1214612146
linkType: hard
1214712147

12148-
"react-data-grid@https://github.com/pgadmin-org/react-data-grid.git#3dfc2ca01a046d55c1c7a45392dcec104815dc76":
12149-
version: 7.0.0-beta.47
12150-
resolution: "react-data-grid@https://github.com/pgadmin-org/react-data-grid.git#commit=3dfc2ca01a046d55c1c7a45392dcec104815dc76"
12151-
dependencies:
12152-
clsx: "npm:^2.0.0"
12148+
"react-data-grid@https://github.com/pgadmin-org/react-data-grid.git#8ddaa7bed99c8329e39b8ff37ba156f7fc8e85d4":
12149+
version: 7.0.0-beta.58
12150+
resolution: "react-data-grid@https://github.com/pgadmin-org/react-data-grid.git#commit=8ddaa7bed99c8329e39b8ff37ba156f7fc8e85d4"
1215312151
peerDependencies:
12154-
react: ^18.0 || ^19.0
12155-
react-dom: ^18.0 || ^19.0
12156-
checksum: 10c0/3d8a110b77c4f766788fa31aff5bbff1f129a3a25bfd2a6a7f9a67f053b0f48bc374d74f477d6a46ea7cce1449bc77334e071fc964933643389950e628d266b5
12152+
react: ^19.2
12153+
react-dom: ^19.2
12154+
checksum: 10c0/531f86c950e4f656cc45f496f7d5f95aaf2c7e2884d864d7954456e531810e7a7d99d52ee984b4140f034fafdc3f601913b8aa0949c8a06df784716dda66f06c
1215712155
languageName: node
1215812156
linkType: hard
1215912157

@@ -12821,9 +12819,9 @@ __metadata:
1282112819
"@date-io/core": "npm:^3.0.0"
1282212820
"@date-io/date-fns": "npm:3.x"
1282312821
"@emotion/memoize": "npm:^0.9.0"
12824-
"@emotion/react": "npm:^11.11.3"
12822+
"@emotion/react": "npm:^11.14.0"
1282512823
"@emotion/sheet": "npm:^1.0.1"
12826-
"@emotion/styled": "npm:^11.11.0"
12824+
"@emotion/styled": "npm:^11.14.1"
1282712825
"@emotion/utils": "npm:^1.0.0"
1282812826
"@fluentui/keyboard-key": "npm:^0.4.23"
1282912827
"@fortawesome/fontawesome-free": "npm:latest"
@@ -12908,7 +12906,7 @@ __metadata:
1290812906
react-arborist: "npm:^3.2.0"
1290912907
react-aspen: "npm:^1.1.0"
1291012908
react-checkbox-tree: "npm:^1.7.2"
12911-
react-data-grid: "https://github.com/pgadmin-org/react-data-grid.git#3dfc2ca01a046d55c1c7a45392dcec104815dc76"
12909+
react-data-grid: "https://github.com/pgadmin-org/react-data-grid.git#8ddaa7bed99c8329e39b8ff37ba156f7fc8e85d4"
1291212910
react-dnd: "npm:^16.0.1"
1291312911
react-dnd-html5-backend: "npm:^16.0.1"
1291412912
react-dom: "npm:^19.0.0"

0 commit comments

Comments
 (0)