rails_modal_manager 1.0.14 → 1.0.15
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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 736e63cc3f81769e168c0945753f8cc1f2f4a8e840fb18a6768f10a76e80f7cc
|
|
4
|
+
data.tar.gz: 8d4cd784e878b2ff7fd5baca62d25c8b9fbd0aefc53caae82f86710805a2f4b5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 235e07f2e6e39617031bf18115bbf775345488aa369331acf2803cd12a0607464b2b4e2507c807957665e85b67731850ee7f84db37b034b00e53cd83773e950f
|
|
7
|
+
data.tar.gz: b9aca2397fdeb003b14ba3f368f76cb60aed7744486534df7fb81de688730b0c5c58144c297a30bb90df98166229b05cb745ef8ef7e00a88db3972b3d68e8c7c
|
|
@@ -40,10 +40,14 @@ export default class extends Controller {
|
|
|
40
40
|
this.element.classList.add('rmm-sidebar-collapsed')
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
// Find initial active item
|
|
43
|
+
// Find initial active item and restore its state
|
|
44
44
|
const activeItem = this.element.querySelector('.rmm-sidebar-item.rmm-active')
|
|
45
45
|
if (activeItem) {
|
|
46
46
|
this.currentItemId = activeItem.dataset.itemId
|
|
47
|
+
// Restore panel and submenu state for the active item
|
|
48
|
+
// This ensures content is properly displayed when modal is reopened
|
|
49
|
+
this.switchPanel(activeItem)
|
|
50
|
+
this.switchSubmenuGroup(activeItem)
|
|
47
51
|
}
|
|
48
52
|
|
|
49
53
|
// Listen for toggle event from header button
|
|
@@ -45,10 +45,17 @@ export default class extends Controller {
|
|
|
45
45
|
this.ajaxCache = new Map()
|
|
46
46
|
this.currentItemId = null
|
|
47
47
|
|
|
48
|
-
// Find initial active item
|
|
48
|
+
// Find initial active item and restore its state
|
|
49
49
|
const activeItem = this.element.querySelector('.rmm-submenu-item.rmm-active')
|
|
50
50
|
if (activeItem) {
|
|
51
51
|
this.currentItemId = activeItem.dataset.itemId
|
|
52
|
+
// Restore panel state for the active item
|
|
53
|
+
// This ensures content is properly displayed when modal is reopened
|
|
54
|
+
if (this.loadModeValue === 'ajax') {
|
|
55
|
+
this.loadAjaxContent(activeItem)
|
|
56
|
+
} else {
|
|
57
|
+
this.switchPanel(activeItem)
|
|
58
|
+
}
|
|
52
59
|
}
|
|
53
60
|
}
|
|
54
61
|
|