beyond-rails 0.0.294 → 0.0.295
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/SearchDropdown.js +3 -9
- 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: 36652abb2afa4c3c6a9aedbe1d08b5048dd48640d0a8a077c32e76ec0614d81f
|
4
|
+
data.tar.gz: a9e338ed7f0b0cde7b26f425672f7e356456c31a82684ca7e952b19148a178fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
186
|
+
let menuItems = items.map((item, i) => {
|
188
187
|
return renderItem(item, i, (selectedIndex === i), items)
|
189
188
|
})
|
190
189
|
|
191
|
-
if (
|
192
|
-
menuItems
|
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
|
}
|
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.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-07-
|
12
|
+
date: 2021-07-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sassc
|