beyond-rails 0.0.279 → 0.0.280
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/src/js/components/Btn.js +8 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a38b5de8421d706a385ccebb6032d1fa306d5c975ed677dc10fd8d9c06e593b4
|
4
|
+
data.tar.gz: c1c622ec7af60ba0a2122d31c6220a899cb528aeb728be883cd66540edb4441c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffc1c3a27cbcfb636150b2c1d621342d5e171d5b87bec8dcd6132894dc6be1e33bd0fc64c5184eaf7d810fb74353d615a3d458aba9079015e3d4faa0cdce352d
|
7
|
+
data.tar.gz: 207893d015edba194e178cf3ea00e81cf1c9c3431b4cf647f3284e8e3920c2421b888b73639a429c599544a9bd1983793e4289fd896023face3538c0965183a5
|
data/src/js/components/Btn.js
CHANGED
@@ -11,6 +11,9 @@ export default class Btn {
|
|
11
11
|
}
|
12
12
|
|
13
13
|
showLoader() {
|
14
|
+
if (this.loading) {
|
15
|
+
return
|
16
|
+
}
|
14
17
|
const { dom } = this
|
15
18
|
this.innerHtml = dom.innerHTML
|
16
19
|
dom.style.height = toPixel(dom.offsetHeight)
|
@@ -28,6 +31,10 @@ export default class Btn {
|
|
28
31
|
}
|
29
32
|
|
30
33
|
hideLoader() {
|
34
|
+
|
35
|
+
if (! this.loading) {
|
36
|
+
return
|
37
|
+
}
|
31
38
|
const { dom } = this
|
32
39
|
dom.style.removeProperty('width')
|
33
40
|
dom.style.removeProperty('height')
|
@@ -40,7 +47,7 @@ export default class Btn {
|
|
40
47
|
}
|
41
48
|
|
42
49
|
setLoading(loading) {
|
43
|
-
this.loading = loading
|
44
50
|
loading ? this.showLoader() : this.hideLoader()
|
51
|
+
this.loading = loading
|
45
52
|
}
|
46
53
|
}
|