Skip to content

Commit

Permalink
Merge pull request #98 from jetstreamapp/bug/92/table-scrolling-bugfix
Browse files Browse the repository at this point in the history
Fix table scrolling
  • Loading branch information
paustint authored Jan 31, 2023
2 parents 682d920 + 56bcf8c commit 3dc3ced
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion libs/ui/src/lib/data-table/SalesforceRecordDataTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,14 @@ type ContextAction = 'COPY_ROW' | 'COPY_ROW_NO_HEADER' | 'COPY_COL' | 'COPY_COL_
const SFDC_EMPTY_ID = '000000000000000AAA';

function getRowId(data: any): string {
if (data._key) {
return data._key;
}
if (data?.attributes?.type === 'AggregateResult') {
return uniqueId('query-results-node-id');
}
let nodeId = data?.attributes?.url || data.Id;
if (!nodeId || nodeId.endsWith(SFDC_EMPTY_ID) || data.Id === SFDC_EMPTY_ID) {
if (!nodeId || data.Id === SFDC_EMPTY_ID || nodeId.endsWith(SFDC_EMPTY_ID)) {
nodeId = uniqueId('query-results-node-id');
}
return nodeId;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@
"quill": "^1.3.7",
"quill-delta": "^3.6.3",
"react": "18.2.0",
"react-data-grid": "^7.0.0-beta.20",
"react-data-grid": "^7.0.0-beta.22",
"react-dnd": "^16.0.1",
"react-dnd-html5-backend": "^16.0.1",
"react-dom": "18.2.0",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -22103,10 +22103,10 @@ react-colorful@^5.1.2:
resolved "https://registry.npmjs.org/react-colorful/-/react-colorful-5.5.1.tgz"
integrity sha512-M1TJH2X3RXEt12sWkpa6hLc/bbYS0H6F4rIqjQZ+RxNBstpY67d9TrFXtqdZwhpmBXcCwEi7stKqFue3ZRkiOg==

react-data-grid@^7.0.0-beta.20:
version "7.0.0-beta.20"
resolved "https://registry.yarnpkg.com/react-data-grid/-/react-data-grid-7.0.0-beta.20.tgz#8a130b7387b0b09fd3f3b1d57a45efd74966ead4"
integrity sha512-SJr425WjXGuiZBr3mCRSv9Fwwmd6MEBrBBtGuWPx8GS4FuhomQWgJHYsfXOGJPBmuayICJ1l/87Cjqri0E0ncA==
react-data-grid@^7.0.0-beta.22:
version "7.0.0-beta.22"
resolved "https://registry.yarnpkg.com/react-data-grid/-/react-data-grid-7.0.0-beta.22.tgz#8ee3b55c511d3bf006c304b8355a6f83c441b8c7"
integrity sha512-uEzT0u8lnSmqh4Cxogy3Z/0L/z5aI4oDLWKyeyc1SVNIEw46KXWTOGin+SRuQg+hJOXY6UnzNreYMWHIF6z8hQ==
dependencies:
clsx "^1.1.1"

Expand Down

0 comments on commit 3dc3ced

Please sign in to comment.