Skip to content

Commit

Permalink
feat(@dpc-sdp/ripple-ui-forms): add throttle prop
Browse files Browse the repository at this point in the history
  • Loading branch information
David Featherston committed Aug 22, 2023
1 parent 04f98aa commit a74ac8b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ interface Props {
required?: boolean
centeredText?: boolean
globalEvents?: boolean
throttle?: number
onInput?: (payload: Event) => void
onBlur?: (payload: Event) => void
}
Expand All @@ -54,6 +55,7 @@ const props = withDefaults(defineProps<Props>(), {
variant: 'default',
centeredText: false,
globalEvents: true,
throttle: 500,
onInput: () => null,
onBlur: () => null
})
Expand Down Expand Up @@ -94,7 +96,7 @@ const handleChange = useDebounceFn(() => {
},
{ global: props.globalEvents }
)
}, 500)
}, props.throttle)
</script>

<template>
Expand Down

0 comments on commit a74ac8b

Please sign in to comment.