rails_modal_manager 1.0.43 → 1.0.44
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: b0752ed8f79cdbe227d9a4010cab4ac2f73cf59e75dade5572bc98cda6374e2d
|
|
4
|
+
data.tar.gz: 5d9d4f28f9f9a4535d5646e707540e21e641f49e5b757a4d50d9cc7afbf1ef54
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fc8042fd0499d9f7076c8ad822ef9849a324f12a733d23a5449b1b07677f9bb73b8b9e9d88324baec9b448ffcdf983d83a1a9d3f6f2e346b87da23fdfd39e9fb
|
|
7
|
+
data.tar.gz: eb4dc333dd595d3bac849153b8e5f7cde6ecefecf3e5d9fa056309e3a479e8e96d70e9734aabd219170a920e79f3e009099128d3a0b5220fb5c5d394d5925545
|
|
@@ -45,6 +45,7 @@ export default class extends Controller {
|
|
|
45
45
|
this.ajaxCache = new Map()
|
|
46
46
|
this.currentItemId = null
|
|
47
47
|
this.currentAbortController = null
|
|
48
|
+
this.currentRequestId = 0
|
|
48
49
|
|
|
49
50
|
// Find initial active item
|
|
50
51
|
const activeItem = this.element.querySelector('.rmm-submenu-item.rmm-active')
|
|
@@ -171,7 +172,7 @@ export default class extends Controller {
|
|
|
171
172
|
|
|
172
173
|
const abortController = new AbortController()
|
|
173
174
|
this.currentAbortController = abortController
|
|
174
|
-
const
|
|
175
|
+
const requestId = ++this.currentRequestId
|
|
175
176
|
|
|
176
177
|
// Show loading state
|
|
177
178
|
contentContainer.classList.add('rmm-tab-loading')
|
|
@@ -192,8 +193,8 @@ export default class extends Controller {
|
|
|
192
193
|
|
|
193
194
|
const html = await response.text()
|
|
194
195
|
|
|
195
|
-
// Validate: only update if this
|
|
196
|
-
if (this.
|
|
196
|
+
// Validate: only update if this is still the latest request
|
|
197
|
+
if (this.currentRequestId !== requestId) {
|
|
197
198
|
return
|
|
198
199
|
}
|
|
199
200
|
|