beyond-rails 1.0.11 → 1.0.14
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 +10 -1
- 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: c6abfc6e8b2e308528106dd0b5bbfb7305ae23035a323fccac661bc1b7c2cf46
|
4
|
+
data.tar.gz: 49e5bf41e1b4f1a705c288b2fc9a13aa3708c900282a152d3eb77a7471c6aa3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 313c84010ef897b581aa15f48ebbb85964aa984ce4fdf1056ca06d4c3f879dfcbf87fc62c420551bc55aa157aced8b129346defeb6a139a109996e5a0e04757a
|
7
|
+
data.tar.gz: 3c57dff44afb302dd230ef5f5ae24a7ff15849059296438dd129ac9c718ebae05fb1aca46140e595de4e8ed539c20a18df77b9fcbcfcd58102d44abe8705030c
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import getKey from '../utils/getKey'
|
2
2
|
import noop from '../utils/noop'
|
3
3
|
import raf from '../utils/raf'
|
4
|
+
import isDef from '../utils/isDef'
|
4
5
|
import supportDom from '../decorators/supportDom'
|
5
6
|
|
6
7
|
@supportDom
|
@@ -12,6 +13,7 @@ export default class TagInput {
|
|
12
13
|
this.validate = options.validate || (() => ({ isTag: true }))
|
13
14
|
this.suggest = options.suggest || noop
|
14
15
|
this.change = options.change || noop
|
16
|
+
this.inputId = options.inputId
|
15
17
|
this.isComposing = false
|
16
18
|
this.raf = raf
|
17
19
|
this.id = 0
|
@@ -25,7 +27,7 @@ export default class TagInput {
|
|
25
27
|
}
|
26
28
|
|
27
29
|
setup() {
|
28
|
-
const { defaultInputWidth } = this
|
30
|
+
const { defaultInputWidth, inputId } = this
|
29
31
|
const inputDiv = document.createElement('div')
|
30
32
|
inputDiv.className = 'tag-input-box'
|
31
33
|
|
@@ -35,6 +37,9 @@ export default class TagInput {
|
|
35
37
|
suggestInput.className = 'tag-suggest-input'
|
36
38
|
|
37
39
|
const input = document.createElement('input')
|
40
|
+
if (inputId) {
|
41
|
+
input.id = inputId
|
42
|
+
}
|
38
43
|
input.type = 'text'
|
39
44
|
input.style.width = defaultInputWidth + 'px'
|
40
45
|
input.className = 'tag-main-input'
|
@@ -181,6 +186,10 @@ export default class TagInput {
|
|
181
186
|
input.value = ''
|
182
187
|
suggestInput.value = ''
|
183
188
|
|
189
|
+
if (isDef(res.text)) {
|
190
|
+
this.addTag(res, 'input')
|
191
|
+
return
|
192
|
+
}
|
184
193
|
const row = Object.assign({}, res, { text: inputValue })
|
185
194
|
this.addTag(row, 'input')
|
186
195
|
}
|
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.
|
4
|
+
version: 1.0.14
|
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: 2022-
|
12
|
+
date: 2022-04-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sassc
|