This is an example app that lets you display a number based on a step selector component value.
You can use a deployed version of the app right here
Open the index.html
file in any browser, then interact with the step selector to see the value change.
A custom event is emitted whenever the user interacts with an action element of the component. The emitted value matches the internally selected value of the component.
emitValue(value) {
// Custom event emitter
const event = new CustomEvent('change', {
detail: {
value // selected value
},
bubbles: true // will continue emitting
});
// Dispatches the event to be emitted to the parent
this.dispatchEvent(event);
}