File tree 1 file changed +8
-3
lines changed
packages/@vue/cli-ui/src/views
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 19
19
api-key =" db283631f89b5b8a10707311f911fd00"
20
20
index-name =" npm-search"
21
21
:query-parameters =" {
22
- hitsPerPage: 10 ,
22
+ hitsPerPage: 20 ,
23
23
attributesToRetrieve: [
24
24
'name',
25
25
'description',
40
40
ref =" searchInput"
41
41
:placeholder =" $t('views.project-plugins-add.tabs.search.search-input')"
42
42
/>
43
- <ais-results >
43
+ <ais-results ref = " results " >
44
44
<PackageSearchItem
45
45
slot-scope =" { result }"
46
46
:pkg =" result"
54
54
<div >{{ $t('views.project-plugins-add.tabs.search.not-found') }}</div >
55
55
</div >
56
56
</ais-no-results >
57
- <InstantSearchPagination />
57
+ <InstantSearchPagination @page-change = " scrollResultsToTop() " />
58
58
</ais-index >
59
59
</div >
60
60
@@ -309,6 +309,11 @@ export default {
309
309
} catch (e) {
310
310
console .error (e)
311
311
}
312
+ },
313
+
314
+ scrollResultsToTop () {
315
+ const vm = this .$refs .results
316
+ if (vm) vm .$el .scrollTop = 0
312
317
}
313
318
}
314
319
}
You can’t perform that action at this time.
0 commit comments