Skip to content
This repository has been archived by the owner on Dec 13, 2019. It is now read-only.

Added Quasar / Vue SFC example for debounce #475

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

geoidesic
Copy link
Contributor

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Documentation
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • It's submitted to the dev branch and not the master branch
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix: #xxx[,#xxx], where "xxx" is the issue number)
  • It's been tested with all major browsers

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:

@geoidesic geoidesic changed the title Added Quasar / Vue SFV example for debounce Added Quasar / Vue SFC example for debounce May 26, 2018
Copy link
Member

@rstoenescu rstoenescu left a 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:
Copy link
Member

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'
Copy link
Member

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) {
Copy link
Member

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" />
Copy link
Member

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) }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants