beyond-rails 0.0.261 → 0.0.262
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 +6 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bd75f8f763821f105483e4945e1edb8236a972a55573ca1009e1d5fa0a3ae34
|
4
|
+
data.tar.gz: db80bcb3ff53b3fb8afe1b23c9de8958e7c0bb94fded145b655f7789cbba5fb2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f004f1c829cd3ba8b6f78b99840cc5ad684840d0e2b101103c864cc11fb7687f7b778bd897ad4109007cff292ad772fb7bdcdf20b2d8cedcfceef736188660d
|
7
|
+
data.tar.gz: a7bef7f76f4a6f535b3f4dd532bdeaf586452a2a319336a8cf4865a503fc4a1f002da2d34c8f5ef388c39021061b6e4a761243894d980b46d34e2a2187316f9d
|
@@ -12,6 +12,7 @@ export default class TagInput {
|
|
12
12
|
this.validate = options.validate || (() => ({ isTag: true }))
|
13
13
|
this.suggest = options.suggest || noop
|
14
14
|
this.change = options.change || noop
|
15
|
+
this.remove = options.remove || noop
|
15
16
|
this.isComposing = false
|
16
17
|
this.raf = raf
|
17
18
|
this.id = 0
|
@@ -109,6 +110,9 @@ export default class TagInput {
|
|
109
110
|
|
110
111
|
getTag(inputValue, options = {}) {
|
111
112
|
|
113
|
+
this.id += 1
|
114
|
+
|
115
|
+
const id = this.id
|
112
116
|
const classname = options.classname ? ` ${options.classname}` : ''
|
113
117
|
const tag = document.createElement('div')
|
114
118
|
|
@@ -124,13 +128,13 @@ export default class TagInput {
|
|
124
128
|
this.tags = this.tags.filter(row => row.elem !== tag)
|
125
129
|
btn.removeEventListener('click', handleBtnClick)
|
126
130
|
tag.remove()
|
131
|
+
this.remove(id)
|
127
132
|
this.change(this.tags.slice())
|
128
133
|
}
|
129
134
|
btn.addEventListener('click', handleBtnClick)
|
130
135
|
tag.appendChild(btn)
|
131
|
-
this.id += 1
|
132
136
|
|
133
|
-
return { id
|
137
|
+
return { id, elem: tag, remove: handleBtnClick, options }
|
134
138
|
}
|
135
139
|
|
136
140
|
setTags(rows) {
|
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.
|
4
|
+
version: 0.0.262
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kmsheng
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-12-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sassc
|