@quillsql/react 2.16.65 → 2.16.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -65217,7 +65217,6 @@ function useReport(reportIdArg, options = {}) {
65217
65217
  () => stableSerializeForQueryKey(effectiveReportBuilderState),
65218
65218
  [effectiveReportBuilderState]
65219
65219
  );
65220
- const createdBootstrapStateMatchesEffectiveState = isCreatedReportBootstrapLoad && stableSerializeForQueryKey(initialReportBuilderStateForLoad) === effectiveReportBuilderStateHash;
65221
65220
  const prevPaginationResetStateHashRef = (0, import_react61.useRef)(null);
65222
65221
  (0, import_react61.useEffect)(() => {
65223
65222
  const prevHash = prevPaginationResetStateHashRef.current;
@@ -65351,7 +65350,7 @@ function useReport(reportIdArg, options = {}) {
65351
65350
  rowCountOnly: true
65352
65351
  });
65353
65352
  }),
65354
- enabled: createdBootstrapStateMatchesEffectiveState && Boolean(client) && !reportOverride,
65353
+ enabled: isCreatedReportBootstrapLoad && Boolean(client) && !reportOverride,
65355
65354
  retry: false
65356
65355
  });
65357
65356
  (0, import_react61.useEffect)(() => {
@@ -65361,13 +65360,15 @@ function useReport(reportIdArg, options = {}) {
65361
65360
  setSourceReport(report);
65362
65361
  }, [effectiveReportId, tableRefreshQuery.data, tableRefreshQueryEnabled]);
65363
65362
  (0, import_react61.useEffect)(() => {
65364
- if (!createdBootstrapStateMatchesEffectiveState) return;
65365
65363
  const countReport = createdBootstrapRowCountQuery.data?.report;
65366
65364
  if (createdBootstrapRowCountQuery.data?.error || !countReport) return;
65367
65365
  setSourceReport((currentReport) => {
65368
65366
  if (!currentReport || currentReport.id !== effectiveReportId) {
65369
65367
  return currentReport;
65370
65368
  }
65369
+ if (stableSerializeForQueryKey(currentReport.reportBuilderState) !== stableSerializeForQueryKey(countReport.reportBuilderState)) {
65370
+ return currentReport;
65371
+ }
65371
65372
  if (currentReport.rowCount === countReport.rowCount) {
65372
65373
  return currentReport;
65373
65374
  }
@@ -65375,7 +65376,6 @@ function useReport(reportIdArg, options = {}) {
65375
65376
  });
65376
65377
  }, [
65377
65378
  createdBootstrapRowCountQuery.data,
65378
- createdBootstrapStateMatchesEffectiveState,
65379
65379
  effectiveReportId,
65380
65380
  sourceReport?.id
65381
65381
  ]);
package/dist/index.js CHANGED
@@ -65429,7 +65429,6 @@ function useReport(reportIdArg, options = {}) {
65429
65429
  () => stableSerializeForQueryKey(effectiveReportBuilderState),
65430
65430
  [effectiveReportBuilderState]
65431
65431
  );
65432
- const createdBootstrapStateMatchesEffectiveState = isCreatedReportBootstrapLoad && stableSerializeForQueryKey(initialReportBuilderStateForLoad) === effectiveReportBuilderStateHash;
65433
65432
  const prevPaginationResetStateHashRef = useRef24(null);
65434
65433
  useEffect31(() => {
65435
65434
  const prevHash = prevPaginationResetStateHashRef.current;
@@ -65563,7 +65562,7 @@ function useReport(reportIdArg, options = {}) {
65563
65562
  rowCountOnly: true
65564
65563
  });
65565
65564
  }),
65566
- enabled: createdBootstrapStateMatchesEffectiveState && Boolean(client) && !reportOverride,
65565
+ enabled: isCreatedReportBootstrapLoad && Boolean(client) && !reportOverride,
65567
65566
  retry: false
65568
65567
  });
65569
65568
  useEffect31(() => {
@@ -65573,13 +65572,15 @@ function useReport(reportIdArg, options = {}) {
65573
65572
  setSourceReport(report);
65574
65573
  }, [effectiveReportId, tableRefreshQuery.data, tableRefreshQueryEnabled]);
65575
65574
  useEffect31(() => {
65576
- if (!createdBootstrapStateMatchesEffectiveState) return;
65577
65575
  const countReport = createdBootstrapRowCountQuery.data?.report;
65578
65576
  if (createdBootstrapRowCountQuery.data?.error || !countReport) return;
65579
65577
  setSourceReport((currentReport) => {
65580
65578
  if (!currentReport || currentReport.id !== effectiveReportId) {
65581
65579
  return currentReport;
65582
65580
  }
65581
+ if (stableSerializeForQueryKey(currentReport.reportBuilderState) !== stableSerializeForQueryKey(countReport.reportBuilderState)) {
65582
+ return currentReport;
65583
+ }
65583
65584
  if (currentReport.rowCount === countReport.rowCount) {
65584
65585
  return currentReport;
65585
65586
  }
@@ -65587,7 +65588,6 @@ function useReport(reportIdArg, options = {}) {
65587
65588
  });
65588
65589
  }, [
65589
65590
  createdBootstrapRowCountQuery.data,
65590
- createdBootstrapStateMatchesEffectiveState,
65591
65591
  effectiveReportId,
65592
65592
  sourceReport?.id
65593
65593
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quillsql/react",
3
- "version": "2.16.65",
3
+ "version": "2.16.66",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {