beyond-rails 0.0.253 → 0.0.254
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/TagInput.js +5 -5
- 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: 0d0d6f0e05e67226b87ac93c97923647d70c9cc574608c8729d2c70bd1d09290
|
4
|
+
data.tar.gz: 83974fc639827973d26bcfa8495c5109e8986e3d9b6c44ff720a7ffe37336da6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b816d40ecbbf71d27698d749bce5c10438f03c27a6fb18a1178ded50b863bff5148c0a60aa032965bfb2b84f8e90a362724ab0c1d8fe169a25fad2b1939c53f1
|
7
|
+
data.tar.gz: ac85421f8c566066a552bb2c16ca134ec271aee0fa8911557c13745c28173870527d035b12538c957b0cc789d13ba6e893ad44e462789e818d7f35d6b44ebf4c
|
@@ -99,9 +99,9 @@ export default class TagInput {
|
|
99
99
|
}
|
100
100
|
}
|
101
101
|
|
102
|
-
getTag(inputValue,
|
102
|
+
getTag(inputValue, options = {}) {
|
103
103
|
|
104
|
-
const classname =
|
104
|
+
const classname = options.classname ? ` ${options.classname}` : ''
|
105
105
|
const tag = document.createElement('div')
|
106
106
|
|
107
107
|
tag.className = 'tag' + classname
|
@@ -122,7 +122,7 @@ export default class TagInput {
|
|
122
122
|
tag.appendChild(btn)
|
123
123
|
this.id += 1
|
124
124
|
|
125
|
-
return { id: this.id, elem: tag, remove: handleBtnClick,
|
125
|
+
return { id: this.id, elem: tag, remove: handleBtnClick, options }
|
126
126
|
}
|
127
127
|
|
128
128
|
setTags(rows) {
|
@@ -134,8 +134,8 @@ export default class TagInput {
|
|
134
134
|
this.tags = tags
|
135
135
|
}
|
136
136
|
|
137
|
-
addTag(inputValue,
|
138
|
-
const tag = this.getTag(inputValue,
|
137
|
+
addTag(inputValue, options = {}) {
|
138
|
+
const tag = this.getTag(inputValue, options)
|
139
139
|
this.tags.push(tag)
|
140
140
|
this.dom.insertBefore(tag.elem, this.inputDiv)
|
141
141
|
}
|