mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-15 06:35:20 -07:00
Enable initial search results to be limited
This commit is contained in:
parent
ec7a4eebff
commit
3702254b00
1 changed files with 7 additions and 1 deletions
|
|
@ -192,6 +192,10 @@ export default {
|
|||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
initialLimit: {
|
||||
type: Number,
|
||||
default: null
|
||||
},
|
||||
quickButtons: {
|
||||
type: Array,
|
||||
default: () => [
|
||||
|
|
@ -249,7 +253,9 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
results () {
|
||||
if (!this.hasSearchInputText) return this.appList
|
||||
if (!this.hasSearchInputText) {
|
||||
return this.initialLimit !== null ? this.appList.slice(0, this.initialLimit) : this.appList
|
||||
}
|
||||
|
||||
return [
|
||||
...this.titleStartsWithResults,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue