From bcc5a310810734b3a37f2ff98d9bc49a735190d0 Mon Sep 17 00:00:00 2001 From: Manuel <5673677+mtrezza@users.noreply.github.com> Date: Thu, 17 Jul 2025 14:06:53 +0200 Subject: [PATCH 1/3] fix: info panel loads on cell click even when prefetched --- .../BrowserCell/BrowserCell.react.js | 16 +--------------- .../Data/Browser/DataBrowser.react.js | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/components/BrowserCell/BrowserCell.react.js b/src/components/BrowserCell/BrowserCell.react.js index a020879efc..1b0680a560 100644 --- a/src/components/BrowserCell/BrowserCell.react.js +++ b/src/components/BrowserCell/BrowserCell.react.js @@ -568,8 +568,6 @@ export default class BrowserCell extends Component { onEditChange, setCopyableValue, selectedObjectId, - setSelectedObjectId, - callCloudFunction, isPanelVisible, onPointerCmdClick, row, @@ -580,7 +578,6 @@ export default class BrowserCell extends Component { markRequiredFieldRow, handleCellClick, selectedCells, - setShowAggregatedData, } = this.props; const classes = [...this.state.classes]; @@ -653,18 +650,7 @@ export default class BrowserCell extends Component { onPointerCmdClick(value); } else { setCopyableValue(hidden ? undefined : this.copyableValue); - if (selectedObjectId !== this.props.objectId) { - setShowAggregatedData(true); - setSelectedObjectId(this.props.objectId); - if ( - this.props.objectId && - isPanelVisible && - ((e.shiftKey && !this.props.firstSelectedCell) || !e.shiftKey) - ) { - callCloudFunction(this.props.objectId, this.props.className, this.props.appId); - } - } - handleCellClick(e, row, col); + handleCellClick(e, row, col, this.props.objectId); } }} onDoubleClick={() => { diff --git a/src/dashboard/Data/Browser/DataBrowser.react.js b/src/dashboard/Data/Browser/DataBrowser.react.js index a1dbeedf6d..eaffc7a619 100644 --- a/src/dashboard/Data/Browser/DataBrowser.react.js +++ b/src/dashboard/Data/Browser/DataBrowser.react.js @@ -756,10 +756,26 @@ export default class DataBrowser extends React.Component { }); } - handleCellClick(event, row, col) { + handleCellClick(event, row, col, objectId) { const { firstSelectedCell } = this.state; const clickedCellKey = `${row}-${col}`; + if (this.state.selectedObjectId !== objectId) { + this.setShowAggregatedData(true); + this.setSelectedObjectId(objectId); + if ( + objectId && + this.state.isPanelVisible && + ((event.shiftKey && !firstSelectedCell) || !event.shiftKey) + ) { + this.handleCallCloudFunction( + objectId, + this.props.className, + this.props.app.applicationId + ); + } + } + if (event.shiftKey && firstSelectedCell) { const [firstRow, firstCol] = firstSelectedCell.split('-').map(Number); const [lastRow, lastCol] = clickedCellKey.split('-').map(Number); From 4a50d65f8cff6159a0b25deef211208d271ed02f Mon Sep 17 00:00:00 2001 From: Manuel Trezza <5673677+mtrezza@users.noreply.github.com> Date: Thu, 17 Jul 2025 14:12:30 +0200 Subject: [PATCH 2/3] Update BrowserCell.react.js --- src/components/BrowserCell/BrowserCell.react.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/components/BrowserCell/BrowserCell.react.js b/src/components/BrowserCell/BrowserCell.react.js index 1b0680a560..ff054ed9cb 100644 --- a/src/components/BrowserCell/BrowserCell.react.js +++ b/src/components/BrowserCell/BrowserCell.react.js @@ -567,8 +567,6 @@ export default class BrowserCell extends Component { current, onEditChange, setCopyableValue, - selectedObjectId, - isPanelVisible, onPointerCmdClick, row, col, From b03dd5f4d4325892ea159a778b3908edfd8085ca Mon Sep 17 00:00:00 2001 From: Manuel Trezza <5673677+mtrezza@users.noreply.github.com> Date: Thu, 17 Jul 2025 14:13:52 +0200 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0a9d3aef4f..080e3c00cd 100644 --- a/README.md +++ b/README.md @@ -1185,7 +1185,7 @@ To reduce the time for info panel data to appear, data can be prefetched. | `infoPanel[*].prefetchObjects` | Number | yes | `0` | `2` | Number of next rows to prefetch when browsing sequential rows. For example, `2` means the next 2 rows will be fetched in advance. | | `infoPanel[*].prefetchStale` | Number | yes | `0` | `10` | Duration in seconds after which prefetched data is discarded as stale. | -Prefetching is particularly useful when navigating through lists of objects. To optimize performance and avoid unnecessary data loading, prefetching is triggered only after the user has moved through 3 consecutive rows using the keyboard down-arrow key. +Prefetching is particularly useful when navigating through lists of objects. To optimize performance and avoid unnecessary data loading, prefetching is triggered only after the user has moved through 3 consecutive rows using the keyboard down-arrow key or by mouse click. ### Freeze Columns