From 3a7aca95d448e43bbedb51026c67504052cc086a Mon Sep 17 00:00:00 2001 From: Biruk Haileye Tabor Date: Fri, 25 Apr 2025 10:17:46 +0300 Subject: [PATCH] Add default onIncrement and OnDecrement callbacks Add default onIncrement and OnDecrement callbacks to dispatch input event --- src/components/input-counter/index.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/components/input-counter/index.ts b/src/components/input-counter/index.ts index e6715cd49..efb193fb3 100644 --- a/src/components/input-counter/index.ts +++ b/src/components/input-counter/index.ts @@ -7,8 +7,16 @@ import instances from '../../dom/instances'; const Default: InputCounterOptions = { minValue: null, maxValue: null, - onIncrement: () => {}, - onDecrement: () => {}, + onIncrement: (instance) => { + instance._targetEl.dispatchEvent( + new Event('input', { bubbles: true }) + ); + }, + onDecrement: (instance) => { + instance._targetEl.dispatchEvent( + new Event('input', { bubbles: true }) + ); + }, }; const DefaultInstanceOptions: InstanceOptions = {