@quillsql/react 2.16.18 → 2.16.19
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 +6 -0
- package/dist/index.js +6 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -24294,12 +24294,14 @@ var useDashboard = (dashboardName, config) => {
|
|
|
24294
24294
|
const reportRequestIds = (0, import_react2.useRef)({});
|
|
24295
24295
|
const lastDashboardName = (0, import_react2.useRef)(null);
|
|
24296
24296
|
const pendingNameChangeReload = (0, import_react2.useRef)(false);
|
|
24297
|
+
const shouldReloadOnNameChange = (0, import_react2.useRef)(false);
|
|
24297
24298
|
(0, import_react2.useEffect)(() => {
|
|
24298
24299
|
customFiltersRef.current = customReportFilters;
|
|
24299
24300
|
}, [customReportFilters]);
|
|
24300
24301
|
(0, import_react2.useEffect)(() => {
|
|
24301
24302
|
const nameChanged = dashboardName !== lastDashboardName.current;
|
|
24302
24303
|
if (nameChanged) {
|
|
24304
|
+
shouldReloadOnNameChange.current = lastDashboardName.current !== null;
|
|
24303
24305
|
lastDashboardName.current = dashboardName ?? null;
|
|
24304
24306
|
initialLoad.current = true;
|
|
24305
24307
|
fetchedInitialReports.current = false;
|
|
@@ -24311,6 +24313,10 @@ var useDashboard = (dashboardName, config) => {
|
|
|
24311
24313
|
if (pendingNameChangeReload.current && data) {
|
|
24312
24314
|
pendingNameChangeReload.current = false;
|
|
24313
24315
|
initialLoad.current = false;
|
|
24316
|
+
if (shouldReloadOnNameChange.current) {
|
|
24317
|
+
shouldReloadOnNameChange.current = false;
|
|
24318
|
+
reload(dashboardName, true);
|
|
24319
|
+
}
|
|
24314
24320
|
return;
|
|
24315
24321
|
}
|
|
24316
24322
|
if (pendingNameChangeReload.current && !isLoading && !data && initialLoad.current) {
|
package/dist/index.js
CHANGED
|
@@ -24314,12 +24314,14 @@ var useDashboard = (dashboardName, config) => {
|
|
|
24314
24314
|
const reportRequestIds = useRef2({});
|
|
24315
24315
|
const lastDashboardName = useRef2(null);
|
|
24316
24316
|
const pendingNameChangeReload = useRef2(false);
|
|
24317
|
+
const shouldReloadOnNameChange = useRef2(false);
|
|
24317
24318
|
useEffect2(() => {
|
|
24318
24319
|
customFiltersRef.current = customReportFilters;
|
|
24319
24320
|
}, [customReportFilters]);
|
|
24320
24321
|
useEffect2(() => {
|
|
24321
24322
|
const nameChanged = dashboardName !== lastDashboardName.current;
|
|
24322
24323
|
if (nameChanged) {
|
|
24324
|
+
shouldReloadOnNameChange.current = lastDashboardName.current !== null;
|
|
24323
24325
|
lastDashboardName.current = dashboardName ?? null;
|
|
24324
24326
|
initialLoad.current = true;
|
|
24325
24327
|
fetchedInitialReports.current = false;
|
|
@@ -24331,6 +24333,10 @@ var useDashboard = (dashboardName, config) => {
|
|
|
24331
24333
|
if (pendingNameChangeReload.current && data) {
|
|
24332
24334
|
pendingNameChangeReload.current = false;
|
|
24333
24335
|
initialLoad.current = false;
|
|
24336
|
+
if (shouldReloadOnNameChange.current) {
|
|
24337
|
+
shouldReloadOnNameChange.current = false;
|
|
24338
|
+
reload(dashboardName, true);
|
|
24339
|
+
}
|
|
24334
24340
|
return;
|
|
24335
24341
|
}
|
|
24336
24342
|
if (pendingNameChangeReload.current && !isLoading && !data && initialLoad.current) {
|