/* START - Rocket auto generated - do not touch */
export const sourceRelativeFilePath = 'mixins/dile-form-change-detect-mixin.rocket.md';
import { layout } from '../recursive.data.js';
export { layout };
/* END - Rocket auto generated - do not touch */
export const title = 'DileFormChangeDetectMixin';
import { html, css, LitElement } from 'lit';
import "@dile/dile-menu-hamburger/dile-menu-hamburger.js";
import "@dile/dile-selector/dile-selector.js";
import "@dile/dile-selector/dile-selector-item.js";
This mixin detects changes in a form and emmit a dile-form-changed
event when it occurs.
To detect changes the form elements should emmit a element-changed
event. for this reason, this mixins only works with custom elements that have this custom event implemented.
You could use the DileEmmitChangeMixin to send the
element-changed
custom event easily.
Also, for this mixin do its work depends on the DileFormMixin, so you need to implement both mixins.
npm i @dile/dile-form-mixin
import { DileFormChangeDetectMixin, DileFormMixin } from '@dile/dile-form-mixin';
export class FctCrudFilters extends
DileFormChangeDetectMixin(DileFormMixin(LitElement)) {
// Code of your component...
}