Skip to content

valueChanged

valueChanged is a DOM event that occurs after the value of a h-input-stepper webcomponent has changed.

Event body

The valueChanged body has a TInputStepperChangeEvent type which represents the details of the targeted input stepper. It is optional so it might not exist.

Example

In this example we listen to valueChanged event and perform an action whenever it's emitted.

useStorefront(async (storefront) => {
    document.addEventListener('valueChanged', (event) => {
        const value = event.detail?.value;

        console.log('h-input-stepper value has been changed to', value);
    });
});