From e9b8b35f666161a5abadff10b80250dffd4d6b84 Mon Sep 17 00:00:00 2001 From: Noel da Costa Date: Sat, 26 May 2018 22:45:16 +0100 Subject: [PATCH] Added Quasar / Vue SFV example for debounce --- source/components/other-utils.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/source/components/other-utils.md b/source/components/other-utils.md index f79663a0..6c44414b 100644 --- a/source/components/other-utils.md +++ b/source/components/other-utils.md @@ -50,6 +50,23 @@ window.addEventListener( ) ``` +Vue SFV example: +``` + +export default { + import { debounce } from 'quasar' + methods: { + save: debounce(function(field, value) { + console.log(value); + }, 300 /*ms to wait*/) + } +} + +``` + ## Throttle Function Throttling enforces a maximum number of times a function can be called over time. As in "execute this function at most once every X milliseconds."