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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/src/js/components/Btn.js +8 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 15297937ea1d1c28d437fe383e3c56b7f2f7c67541c38aaea98e72d1bce1ccef
4
- data.tar.gz: fd0d6b35386c60d9fd6e9f392c4f24f47ceca13b3f6aab25a1349333c7037e89
3
+ metadata.gz: a38b5de8421d706a385ccebb6032d1fa306d5c975ed677dc10fd8d9c06e593b4
4
+ data.tar.gz: c1c622ec7af60ba0a2122d31c6220a899cb528aeb728be883cd66540edb4441c
5
5
  SHA512:
6
- metadata.gz: 427e1a00e3963ac3fa025ba83a0b436ad3c9c85e0cb1171640ffe8ac0bb0f0ed845864bee01644356710299f3685851a7da7445a388a6789b84ed300a83de398
7
- data.tar.gz: 217b0709aad9b5658554fd994381589acbc8f62c6fb1169941d85f1d9e9735d4e7c3493631df76f5b944ff87473ee6f61afe9682c119ae07848ab44c9294c5dc
6
+ metadata.gz: ffc1c3a27cbcfb636150b2c1d621342d5e171d5b87bec8dcd6132894dc6be1e33bd0fc64c5184eaf7d810fb74353d615a3d458aba9079015e3d4faa0cdce352d
7
+ data.tar.gz: 207893d015edba194e178cf3ea00e81cf1c9c3431b4cf647f3284e8e3920c2421b888b73639a429c599544a9bd1983793e4289fd896023face3538c0965183a5
@@ -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
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beyond-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.279
4
+ version: 0.0.280
5
5
  platform: ruby
6
6
  authors:
7
7
  - kmsheng