Skip to content

Commit

Permalink
Handle zero results (#18535)
Browse files Browse the repository at this point in the history
* fix error shown for zero results

* cleanup
  • Loading branch information
cssuh authored Dec 20, 2024
1 parent 411bdb1 commit ddee5dd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/reactviews/pages/QueryResult/resultGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,14 @@ const ResultGrid = forwardRef<ResultGridHandle, ResultGridProps>(
let dataProvider = new HybridDataProvider(
collection,
(_startIndex, _count) => {
return props.loadFunc(_startIndex, _count);
if (
props.resultSetSummary?.rowCount &&
props.resultSetSummary?.rowCount > 0
) {
return props.loadFunc(_startIndex, _count);
} else {
return Promise.resolve([]);
}
},
(data: DbCellValue) => {
if (!data || data.isNull) {
Expand Down

0 comments on commit ddee5dd

Please sign in to comment.