beyond-rails 0.0.291 → 0.0.295

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 152e59958936f1ff0ad2eace8ae5d00aa360d2da7d70aa639e841839b4ce210b
4
- data.tar.gz: a914620707a8c82045c819410d80a883079d63e735ead6a1137e1645015c5f6d
3
+ metadata.gz: 36652abb2afa4c3c6a9aedbe1d08b5048dd48640d0a8a077c32e76ec0614d81f
4
+ data.tar.gz: a9e338ed7f0b0cde7b26f425672f7e356456c31a82684ca7e952b19148a178fd
5
5
  SHA512:
6
- metadata.gz: 36b438520a83d519a2c1b60ff62c0c11f6eafc146adfd8dc5be5b61ec9ff97b1fbc3f0ea3828b96b40bd40faa634a381d32c9253d5e92dc19a93cf97aef0a16f
7
- data.tar.gz: 3d905e3ec8ad4e3519da1fbf465ed2a1d234e9f87ef3a86a492936f90f148923259258ca3557f791de6d99ce0e02c37fa911c9821cb5433dc142fe230b4faf1c
6
+ metadata.gz: a0951e8675a2f2eb791f6f0bd98dacdea22edc61cad5384c3c6ff4b588f06296bbf7382ad84cb22d1e23deb87c6ff29ce909c9d2c8b4d159a021549aac24b5e1
7
+ data.tar.gz: 674a58e6a09c7dd7bcd453e4e1f061642fabfa0ec9ce52539d8cc1a3c6a80432aece770737cd39b118446dbd5619e4134af489d5056937812fe2bddb7af1e19c
@@ -33,7 +33,6 @@ export default class SearchDropdown {
33
33
  this.items = []
34
34
  this.compositionStarted = false
35
35
  this.compositionJustEnded = false
36
- this.noDataMsgVisible = false
37
36
  this.loading = true
38
37
  this.init()
39
38
  }
@@ -184,12 +183,12 @@ export default class SearchDropdown {
184
183
  const { menuContent, items, selectedIndex } = this
185
184
  const { renderItem } = this.options
186
185
 
187
- const menuItems = items.map((item, i) => {
186
+ let menuItems = items.map((item, i) => {
188
187
  return renderItem(item, i, (selectedIndex === i), items)
189
188
  })
190
189
 
191
- if (this.noDataMsgVisible) {
192
- menuItems.unshift(`<div class="search-dropdown-menu-item">${this.noDataMsg}</div>`)
190
+ if (menuItems.length === 0) {
191
+ menuItems = [`<div class="search-dropdown-menu-item">${this.noDataMsg}</div>`]
193
192
  }
194
193
 
195
194
  menuContent.innerHTML = menuItems.join('')
@@ -226,7 +225,6 @@ export default class SearchDropdown {
226
225
  }
227
226
  this.resetSelectedIndex()
228
227
  this.lastKeyword = keyword
229
- this.noDataMsgVisible = false
230
228
  this.setItems([])
231
229
 
232
230
  this.setLoading(true)
@@ -235,10 +233,6 @@ export default class SearchDropdown {
235
233
 
236
234
  this.setLoading(false)
237
235
 
238
- if (items.length === 0) {
239
- this.noDataMsgVisible = true
240
- }
241
-
242
236
  if (this.lastKeyword === this.input.value) {
243
237
  this.setItems(items)
244
238
  }
@@ -189,6 +189,11 @@ export default class TagInput {
189
189
  const lastTag = this.tags[this.tags.length - 1]
190
190
  if ((this.input.value === '') && lastTag) {
191
191
  lastTag.remove()
192
+ this.change({
193
+ type: 'remove',
194
+ removedId: lastTag.id,
195
+ tags: this.tags.slice()
196
+ })
192
197
  }
193
198
  }
194
199
 
@@ -38,6 +38,7 @@
38
38
  text-align: left;
39
39
  max-width: 210px;
40
40
  display: inline-block;
41
+ word-break: break-all;
41
42
  }
42
43
  .toast-btn {
43
44
  padding: 7px 14px 7px 24px;
@@ -4,7 +4,8 @@
4
4
  display: none;
5
5
  z-index: 1;
6
6
  position: absolute;
7
- padding: 7px 10px;
7
+ padding: 6px 12px;
8
+ line-height: 1.9;
8
9
  color: #fff;
9
10
  background-color: #555;
10
11
  }
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.291
4
+ version: 0.0.295
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: 2021-06-23 00:00:00.000000000 Z
12
+ date: 2021-07-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sassc