Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create debounce strategy(may be property 'search-delay') on server-side data load when search. #17

Open
shiayoung opened this issue Feb 13, 2019 · 2 comments
Labels
suggestion The suggestion for project

Comments

@shiayoung
Copy link

No description provided.

@TerryZ TerryZ added the suggestion The suggestion for project label Jun 29, 2019
@TerryZ
Copy link
Owner

TerryZ commented Jun 29, 2019

working on that

@efesozen
Copy link

efesozen commented Jan 4, 2021

The following method can be used until the problem is resolved.

https://github.com/bjoerge/debounce-promise

import Vue from 'vue'
import vSelectPage from 'v-selectpage'
var debounce = require('debounce-promise')

Vue.use(vSelectPage, {
  // server side data loader
  dataLoad:  debounce((vue, data, params) => {
    return new Promise((resolve, reject)=>{
        axios.post(url, params).then(resp => resolve(resp), resp => reject(resp))
      })
  }, 500)
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion The suggestion for project
Projects
None yet
Development

No branches or pull requests

3 participants