beyond-rails 0.0.201 → 0.0.202
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/Dropdown.js +9 -0
- 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: c816a4705572ba5547e235aa306aa86bdb1a378f2e726305bfd72cab13817de1
|
4
|
+
data.tar.gz: 6e3ce062286f84b8b390a7a905168a362f6aa2a41ae60aeff0d96d422c104b88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1f3a3c4252e1a060e277a1adee4b7936f9d0ff4897f5f7cde4839e868b7a08b36a871965ab0fa6bd3b3fde096e562f60440f5b543c0fea7d3b04e59f983af71
|
7
|
+
data.tar.gz: fc0200739a4d9eee637fbc3960e0be00a1ecca07d711a83ad54a516c7a19648e4a8feba55a217646b53dd733f5dd03e85b9ced0985aaf43ebca2f664e1fbb21d
|
@@ -34,8 +34,17 @@ export default class Dropdown {
|
|
34
34
|
}
|
35
35
|
|
36
36
|
init() {
|
37
|
+
|
38
|
+
if (! this.dom) {
|
39
|
+
throw new Error('dom is missing in Dropdown class')
|
40
|
+
}
|
41
|
+
|
37
42
|
this.id = this.dom.dataset.target
|
38
43
|
this.menu = document.querySelector(`[data-dropdown-menu="${this.id}"]`)
|
44
|
+
|
45
|
+
if (! this.menu) {
|
46
|
+
throw new Error(`menu ${this.id} is missing in Dropdown class`)
|
47
|
+
}
|
39
48
|
this.place = this.menu.dataset.place || 'bottom'
|
40
49
|
this.align = this.menu.dataset.align
|
41
50
|
this.menu.remove()
|