-
Notifications
You must be signed in to change notification settings - Fork 313
Added Quasar / Vue SFC example for debounce #475
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for wanting to contribute.
Please test the snippet before submitting to docs.
@@ -50,6 +50,23 @@ window.addEventListener( | |||
) | |||
``` | |||
|
|||
Vue SFV example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did u mean SFC?
</template | ||
<script> | ||
export default { | ||
import { debounce } from 'quasar' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import statement inside the export generates error. it should be outside of the exported object.
export default { | ||
import { debounce } from 'quasar' | ||
methods: { | ||
save: debounce(function(field, value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're calling the "save" method with one parameter only (the value), but it's definition has two parameters, out of which the first one is the "field"
Vue SFV example: | ||
``` | ||
<template> | ||
<q-input @keyup="save(submission)" v-model="submission" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for completeness, it would be better as @keyup="() => { save(submission) }
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:
dev
branch and not themaster
branchfix: #xxx[,#xxx]
, where "xxx" is the issue number)If adding a new feature, the PR's description includes:
Other information: