DileEmmitChange
This mixin has a method to emmit a element-changed
custom event.
The components how implements this mixin must call the method for themselves.
This mixin is useful to create a standard custom event used on form elements that can be integrated to the automatisms that DileFormMixin provides.
Installation
npm i @dile/ui
Usage
import { DileEmmitChange } from '@dile/ui/mixins/form';
class MyElement extends DileEmmitChangeMixin(HTMLElement) {
// your custom element code...
}
Methods
- emmitChange(): this method emmits the
element-changed
custom event. The event is configured with a detail object containing thename
andvalue
properties of the component.
detail: {
name: this.name,
value: this.value
}
Implementations of DileEmmitChangeMixin
There are many form components that implements this mixin.
- dile-input
- dile-radio-group
- dile-select
- And others...