beyond-rails 1.0.9 → 1.0.12

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/src/js/components/Tabbox.js +15 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8a4fc7989841641152627de4c651d6c726f5d6c5a2aba23b3876da97fad82aa7
4
- data.tar.gz: dcd745ce8ffb46e489dd0c1ac2293c0e0f4719d408767096bb542ff8f01d5495
3
+ metadata.gz: 26aae44ec06ec8216eebe16e794065aa23c7e510d6253a0de48f6deff3294731
4
+ data.tar.gz: e13f0bb6afb3827f57c07e2fdadc9d5e6f3381266c36142f44750c500a132b02
5
5
  SHA512:
6
- metadata.gz: 8522389bd4aa3eb9ad54b10df016214d9a9ab0f110db802830d5c70e8fd07ffc89a724e65d8ddd1b9b3b42f94350f0a5aeb257bee0b76390cbd8b8c16ec665f4
7
- data.tar.gz: 98c27a007dbcf56ecd3b8a9c6ffd413eebffd22beeb93643cdda6868d00bbc8804df462efab5998f95c39fa38a2f14410f99b9b7662ff945062245f51d4b64a6
6
+ metadata.gz: 6a6f7d37b7378f86d6043be868c80e8ade984fbfd9dc27866ef461976927338c34d3a351e34171773ad6535fe8253395eec72f558d6b5b69075020f88c5931aa
7
+ data.tar.gz: 99342b5ea812513262e4e5e15ddbabddbbda9a359490ca6d09c96acdeb4186847b53daa4c29b348303a9b57684da28294db3a8476c6eb477047796739047e92b
@@ -41,6 +41,17 @@ export default class Tabbox {
41
41
  this.moveToCurrentNode()
42
42
  this.addCurrentClass()
43
43
  }
44
+ else {
45
+ this.eachDropdownOption(({ dropdownBtn, dropdownInstance, optionEl }) => {
46
+ if (optionEl.dataset.tabboxItem === name) {
47
+ this.setDropdown({
48
+ dropdownBtn,
49
+ optionEl,
50
+ dropdownInstance
51
+ })
52
+ }
53
+ })
54
+ }
44
55
  }
45
56
 
46
57
  eachDropdownOption(fn) {
@@ -118,11 +129,14 @@ export default class Tabbox {
118
129
  }
119
130
  if ('tabboxDropdown' in node.dataset) {
120
131
  const { optionEl } = this
132
+ if (! optionEl) {
133
+ return
134
+ }
121
135
  return this.moveSlider({
122
136
  top: node.offsetTop,
123
137
  left: node.offsetLeft,
124
138
  width: node.offsetWidth,
125
- color: optionEl ? optionEl.dataset.activeColor : node.dataset.activeColor
139
+ color: optionEl.dataset.activeColor
126
140
  })
127
141
  }
128
142
  this.moveSlider({
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: 1.0.9
4
+ version: 1.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - kmsheng