Skip to content

Commit

Permalink
feat(@dpc-sdp/ripple-ui-forms): debounce input change event (primaril…
Browse files Browse the repository at this point in the history
…y for numbers)
  • Loading branch information
David Featherston committed Aug 18, 2023
1 parent 984d07b commit af6686d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export default {

<script setup lang="ts">
import { computed, inject } from 'vue'
import { useDebounceFn } from '@vueuse/core'
import { RplIcon } from '@dpc-sdp/ripple-ui-core/vue'
import RplFormCounter from '../RplFormCounter/RplFormCounter.vue'
import { useRippleEvent } from '@dpc-sdp/ripple-ui-core'
Expand Down Expand Up @@ -80,7 +81,7 @@ const classes = computed(() => {
const isWordCounter = computed(() => props.counter === 'word')
const handleChange = () => {
const handleChange = useDebounceFn(() => {
emitRplEvent(
'update',
{
Expand All @@ -93,7 +94,7 @@ const handleChange = () => {
},
{ global: props.globalEvents }
)
}
}, 500)
</script>

<template>
Expand Down

0 comments on commit af6686d

Please sign in to comment.