rails_modal_manager 1.0.26 → 1.0.27
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: e919b275fd361881663b301cd23661d0ac6bb593c2798eb2a77b0bb231e4f4c1
|
|
4
|
+
data.tar.gz: 553fe6e5cc9235cd0c87997d07c630795893c235a79983416d8423d65a4f013d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 18794e80fb189d47781ba21e1a673499f459cabcc835509c97d87748d5ad16781634a2341796b3e14c45f6442a0af1643b80c0a534dbf3075696bf690a785396
|
|
7
|
+
data.tar.gz: 2f26034a4577fba61a50ab77292203df2c2f4916f4b9dbe8b9879ea30e93baeae66b896dd75f23d73f9713e80cee0f8171fcb24dab7d50b93348a18b95891b84
|
|
@@ -204,13 +204,20 @@ export default class extends Controller {
|
|
|
204
204
|
if (!this.refreshOnReselectValue) {
|
|
205
205
|
return
|
|
206
206
|
}
|
|
207
|
-
|
|
207
|
+
|
|
208
|
+
// 서브메뉴가 있는 경우 forceReloadActive 호출하여 콘텐츠 새로고침
|
|
209
|
+
const submenuId = item.dataset.submenuId
|
|
210
|
+
if (submenuId) {
|
|
211
|
+
this.triggerSubmenuReload(submenuId)
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// 이벤트 발생
|
|
208
215
|
this.dispatch('itemSelect', {
|
|
209
216
|
detail: {
|
|
210
217
|
modalId: this.modalIdValue,
|
|
211
218
|
itemId: item.dataset.itemId,
|
|
212
219
|
itemLabel: item.dataset.itemLabel,
|
|
213
|
-
hasSubmenu: !!
|
|
220
|
+
hasSubmenu: !!submenuId,
|
|
214
221
|
isReselect: true,
|
|
215
222
|
}
|
|
216
223
|
})
|
|
@@ -393,6 +400,29 @@ export default class extends Controller {
|
|
|
393
400
|
})
|
|
394
401
|
}
|
|
395
402
|
|
|
403
|
+
/**
|
|
404
|
+
* Trigger submenu reload for reselected sidebar item
|
|
405
|
+
*/
|
|
406
|
+
triggerSubmenuReload(submenuId) {
|
|
407
|
+
const modal = this.element.closest('.rmm-modal')
|
|
408
|
+
if (!modal) return
|
|
409
|
+
|
|
410
|
+
const targetSubmenu = modal.querySelector(`#${submenuId}`)
|
|
411
|
+
if (!targetSubmenu) return
|
|
412
|
+
|
|
413
|
+
const submenuElement = targetSubmenu.querySelector('[data-controller*="rmm-submenu"]')
|
|
414
|
+
if (!submenuElement) return
|
|
415
|
+
|
|
416
|
+
const submenuController = this.application.getControllerForElementAndIdentifier(
|
|
417
|
+
submenuElement,
|
|
418
|
+
'rmm-submenu'
|
|
419
|
+
)
|
|
420
|
+
|
|
421
|
+
if (submenuController && typeof submenuController.forceReloadActive === 'function') {
|
|
422
|
+
submenuController.forceReloadActive()
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
|
|
396
426
|
/**
|
|
397
427
|
* Switch submenu group for reset (without triggering content reload)
|
|
398
428
|
* This version doesn't call forceReloadActive to avoid duplicate loads
|