@quillsql/react 2.16.17 → 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 +7 -1
- package/dist/index.js +7 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -378,7 +378,7 @@ var init_constants = __esm({
|
|
|
378
378
|
"src/utils/constants.ts"() {
|
|
379
379
|
"use strict";
|
|
380
380
|
MAX_PIVOT_UNIQUE_VALUES = 250;
|
|
381
|
-
QUILL_SERVER = typeof process !== "undefined" && process.env ? process.env.QUILL_SERVER_HOST ?? "https://quill
|
|
381
|
+
QUILL_SERVER = typeof process !== "undefined" && process.env ? process.env.QUILL_SERVER_HOST ?? "https://api.quill.co" : "https://api.quill.co";
|
|
382
382
|
QUILL_QUERY_ENDPOINT = typeof process !== "undefined" && process.env ? process.env.QUILL_QUERY_ENDPOINT ?? "/cloud/engine" : "/cloud/engine";
|
|
383
383
|
ALL_TENANTS = "QUILL_ALL_TENANTS";
|
|
384
384
|
SINGLE_TENANT = "QUILL_SINGLE_TENANT";
|
|
@@ -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
|
@@ -392,7 +392,7 @@ var init_constants = __esm({
|
|
|
392
392
|
"src/utils/constants.ts"() {
|
|
393
393
|
"use strict";
|
|
394
394
|
MAX_PIVOT_UNIQUE_VALUES = 250;
|
|
395
|
-
QUILL_SERVER = typeof process !== "undefined" && process.env ? process.env.QUILL_SERVER_HOST ?? "https://quill
|
|
395
|
+
QUILL_SERVER = typeof process !== "undefined" && process.env ? process.env.QUILL_SERVER_HOST ?? "https://api.quill.co" : "https://api.quill.co";
|
|
396
396
|
QUILL_QUERY_ENDPOINT = typeof process !== "undefined" && process.env ? process.env.QUILL_QUERY_ENDPOINT ?? "/cloud/engine" : "/cloud/engine";
|
|
397
397
|
ALL_TENANTS = "QUILL_ALL_TENANTS";
|
|
398
398
|
SINGLE_TENANT = "QUILL_SINGLE_TENANT";
|
|
@@ -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) {
|