Fixed an issue where copying query tool output cell is not working if any SQL text is selected. #8273

Rebase react-data-grid fork to latest.
pull/8336/head
Aditya Toshniwal 2025-01-03 14:03:33 +05:30
parent 657bf08fb8
commit 6dab60d9e4
4 changed files with 10 additions and 8 deletions

View File

@ -40,3 +40,4 @@ Bug fixes
| `Issue #8254 <https://github.com/pgadmin-org/pgadmin4/issues/8254>`_ - Fix a formatting issue in View/Edit tool generated SQL where some filters are applied.
| `Issue #8255 <https://github.com/pgadmin-org/pgadmin4/issues/8255>`_ - Fixed an issue where tooltip on a dropdown button is blocking access to dropdown menu.
| `Issue #8256 <https://github.com/pgadmin-org/pgadmin4/issues/8256>`_ - Fix the error occurring while loading preferences on startup.
| `Issue #8273 <https://github.com/pgadmin-org/pgadmin4/issues/8273>`_ - Fixed an issue where copying query tool output cell is not working if any SQL text is selected.

View File

@ -129,7 +129,7 @@
"react-arborist": "^3.2.0",
"react-aspen": "^1.1.0",
"react-checkbox-tree": "^1.7.2",
"react-data-grid": "https://github.com/pgadmin-org/react-data-grid.git#4e10a5a327ff58198ac83c7b0c62549b20b78ae5",
"react-data-grid": "https://github.com/pgadmin-org/react-data-grid.git#rebase-01-Jan-2025",
"react-dnd": "^16.0.1",
"react-dnd-html5-backend": "^16.0.1",
"react-dom": "^18.2.0",

View File

@ -24,6 +24,7 @@ import gettext from 'sources/gettext';
import PgReactDataGrid from '../../../../../../static/js/components/PgReactDataGrid';
import { isMac } from '../../../../../../static/js/keyboard_shortcuts';
import { measureText } from '../../../../../../static/js/utils';
import { useHeaderRowSelection } from 'react-data-grid';
export const ROWNUM_KEY = '$_pgadmin_rownum_key_$';
export const GRID_ROW_SELECT_KEY = '$_pgadmin_gridrowselect_key_$';
@ -128,7 +129,7 @@ CustomRow.propTypes = {
};
function SelectAllHeaderRenderer({isCellSelected}) {
const [isRowSelected, onRowSelectionChange] = useRowSelection();
const {isRowSelected, onRowSelectionChange} = useHeaderRowSelection();
const cellRef = useRef();
const eventBus = useContext(QueryToolEventsContext);
const dataGridExtras = useContext(DataGridExtrasContext);
@ -293,7 +294,7 @@ function initialiseColumns(columns, rows, totalRowCount, columnWidthBy) {
return retColumns;
}
function RowNumColFormatter({row, rowKeyGetter, rowIdx, dataChangeStore, onSelectedColumnsChange}) {
const [isRowSelected, onRowSelectionChange] = useRowSelection();
const {isRowSelected, onRowSelectionChange} = useRowSelection();
const {startRowNum} = useContext(DataGridExtrasContext);
let rowKey = rowKeyGetter(row);

View File

@ -12835,15 +12835,15 @@ __metadata:
languageName: node
linkType: hard
"react-data-grid@https://github.com/pgadmin-org/react-data-grid.git#4e10a5a327ff58198ac83c7b0c62549b20b78ae5":
version: 7.0.0-beta.44
resolution: "react-data-grid@https://github.com/pgadmin-org/react-data-grid.git#commit=4e10a5a327ff58198ac83c7b0c62549b20b78ae5"
"react-data-grid@https://github.com/pgadmin-org/react-data-grid.git#rebase-01-Jan-2025":
version: 7.0.0-beta.47
resolution: "react-data-grid@https://github.com/pgadmin-org/react-data-grid.git#commit=3dfc2ca01a046d55c1c7a45392dcec104815dc76"
dependencies:
clsx: ^2.0.0
peerDependencies:
react: ^18.0 || ^19.0
react-dom: ^18.0 || ^19.0
checksum: 75e8910f9b69c60c28223e82647cb8323e08d13d1b56eec94e918e7feadc50f5f4257205a3cd628b9fba019577c3ffab62bdecda7d950e7647ba75988de28261
checksum: 47c06eebc3b957e22256552a54193e234d4ea7117f8efa6842abcb2f7f9f6c9f8a936a39ff4870dd5fc4f8a9c834a05a301c4bff065ebd0bac7735d7bb53a8d3
languageName: node
linkType: hard
@ -13641,7 +13641,7 @@ __metadata:
react-arborist: ^3.2.0
react-aspen: ^1.1.0
react-checkbox-tree: ^1.7.2
react-data-grid: "https://github.com/pgadmin-org/react-data-grid.git#4e10a5a327ff58198ac83c7b0c62549b20b78ae5"
react-data-grid: "https://github.com/pgadmin-org/react-data-grid.git#rebase-01-Jan-2025"
react-dnd: ^16.0.1
react-dnd-html5-backend: ^16.0.1
react-dom: ^18.2.0