turbo_boost-elements 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
@@ -26,21 +26,23 @@ export default class ToggleTargetElement extends TurboBoostElement {
|
|
26
26
|
// this.innerHTML = this.cachedHTML
|
27
27
|
}
|
28
28
|
|
29
|
-
collapse () {
|
30
|
-
|
31
|
-
|
32
|
-
this.
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
29
|
+
collapse (delay = 250) {
|
30
|
+
if (delay > 0) {
|
31
|
+
clearTimeout(this.collapseTimeout)
|
32
|
+
return (this.collapseTimeout = setTimeout(() => this.collapse(0), delay))
|
33
|
+
}
|
34
|
+
|
35
|
+
this.innerHTML = ''
|
36
|
+
try {
|
37
|
+
this.currentTriggerElement.expanded = false
|
38
|
+
this.currentTriggerElement.hideDevtool()
|
39
|
+
} catch {}
|
38
40
|
}
|
39
41
|
|
40
42
|
collapseMatches () {
|
41
43
|
document.querySelectorAll(this.collapseSelector).forEach(el => {
|
42
44
|
if (el === this) return
|
43
|
-
if (el.collapse) el.collapse()
|
45
|
+
if (el.collapse) el.collapse(0)
|
44
46
|
})
|
45
47
|
}
|
46
48
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: turbo_boost-elements
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nate Hopkins (hopsoft)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-01-
|
11
|
+
date: 2023-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|