feat: nicer stall cards

This commit is contained in:
Vlad Stan 2023-07-14 15:33:54 +03:00
parent ad0ac073ab
commit 1f0ea23359
5 changed files with 70 additions and 34 deletions

View file

@ -40,16 +40,8 @@ async function customerMarket(path) {
methods: {
refreshProducts: function () {
this.showProducts = false
const searchText = this.searchText?.toLowerCase() || ''
this.partialProducts = []
if (searchText.length < 3) {
this.lastProductIndex = Math.min(this.filteredProducts.length, this.productsPerPage)
this.partialProducts.push(...this.filteredProducts.slice(0, this.lastProductIndex))
setTimeout(() => this.showProducts = true, 0)
return
}
this.startIndex = 0
this.lastProductIndex = Math.min(this.filteredProducts.length, this.productsPerPage)
this.partialProducts.push(...this.filteredProducts.slice(0, this.lastProductIndex))