@moontra/moonui-pro 2.24.6 → 2.24.7
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.global.js +64 -64
- package/dist/index.global.js.map +1 -1
- package/dist/index.mjs +10 -4
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -65070,19 +65070,25 @@ function DashboardInternal({
|
|
|
65070
65070
|
brandName
|
|
65071
65071
|
}) {
|
|
65072
65072
|
const [editMode, setEditMode] = t__default.useState(false);
|
|
65073
|
-
const [widgets, setWidgets] = t__default.useState(initialWidgets);
|
|
65073
|
+
const [widgets, setWidgets] = t__default.useState(() => initialWidgets);
|
|
65074
65074
|
const [selectedTheme, setSelectedTheme] = t__default.useState("analytics");
|
|
65075
|
-
const [timeRange, setTimeRange] = t__default.useState(propTimeRange);
|
|
65075
|
+
const [timeRange, setTimeRange] = t__default.useState(() => propTimeRange);
|
|
65076
65076
|
const [searchQuery, setSearchQuery] = t__default.useState("");
|
|
65077
65077
|
const [showWidgetLibrary, setShowWidgetLibrary] = t__default.useState(false);
|
|
65078
65078
|
const [showTemplates, setShowTemplates] = t__default.useState(false);
|
|
65079
65079
|
const [refreshing, setRefreshing] = t__default.useState(false);
|
|
65080
65080
|
const [showNotifications, setShowNotifications] = t__default.useState(false);
|
|
65081
|
+
const prevInitialWidgetsRef = t__default.useRef(initialWidgets);
|
|
65082
|
+
const prevTimeRangeRef = t__default.useRef(propTimeRange);
|
|
65081
65083
|
t__default.useEffect(() => {
|
|
65082
|
-
|
|
65084
|
+
if (prevInitialWidgetsRef.current !== initialWidgets) {
|
|
65085
|
+
prevInitialWidgetsRef.current = initialWidgets;
|
|
65086
|
+
setWidgets(initialWidgets);
|
|
65087
|
+
}
|
|
65083
65088
|
}, [initialWidgets]);
|
|
65084
65089
|
t__default.useEffect(() => {
|
|
65085
|
-
if (propTimeRange) {
|
|
65090
|
+
if (propTimeRange && prevTimeRangeRef.current !== propTimeRange) {
|
|
65091
|
+
prevTimeRangeRef.current = propTimeRange;
|
|
65086
65092
|
setTimeRange(propTimeRange);
|
|
65087
65093
|
}
|
|
65088
65094
|
}, [propTimeRange]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moontra/moonui-pro",
|
|
3
|
-
"version": "2.24.
|
|
3
|
+
"version": "2.24.7",
|
|
4
4
|
"description": "Premium React components for MoonUI - Advanced UI library with 50+ pro components including performance, interactive, and gesture components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.mjs",
|