vue-simple-suggest
vue-simple-suggest copied to clipboard
When a request is interrupted, the formatting of sentences breaks
I'm submitting a ...
- [x] bug report
- [ ] feature request
- [ ] support request
What is the current behavior?
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
What is the expected behavior?
How are you importing Vue-simple-suggest?
- [ ] ESNext (original code, single-file .vue component, css included) (
import VueSimpleSuggest from 'vue-simple-suggest/lib'
) - [x] ES6 (
import VueSimpleSuggest from 'vue-simple-suggest'
) - [ ] ES7 and above (
import VueSimpleSuggest from 'vue-simple-suggest/dist/es7'
) - [ ] Bundled version (
import VueSimpleSuggest from 'vue-simple-suggest'
) - [ ] CommonJS (
const VueSimpleSuggest = require('vue-simple-suggest')
) - [ ] UMD Component (
<script type="text/javascript" src="https://unpkg.com/vue-simple-suggest"></script>
)
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
- Vue.js Version: 2.6.10
- Vue-simple-suggest version: 1.10.1
- Browser: Chrome 78.0.3904.108
- Language: TypeScript 3.7.0-beta
-
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)
Hello! Can you please provide us the minimal reproduction repo/demo/fiddle/whatever?
Hi @kaskar2008 , I got the same error as @Vsnegovik , here is a JSFiddle that you can use to reproduce: https://jsfiddle.net/gorandespotoski/wsxm9jeo/
Just press any letter to repeat it, like: aaaaaaaaaaaaaaaaaaaaa
and you will notice the json code show up instead of the display-attribute
Is there any workaround or fix for this issue? Our users are still complaining about this - and it would be great to resolve this. I'm happy to hack in something if needed.
Thanks
Found a couple of things that seem to help:
- Calling clearSuggestions whenever the input changes.
- Increasing the debounce value. Guessing that more time between requests means less conflict.