Angular Form - Handle the Value Change Event

To process a new form item value, you need to handle the fieldDataChanged event. If the handling function is not going to be changed during the lifetime of the UI component, assign it to the onFieldDataChanged property when you configure the UI component.

HTML
TypeScript
  • <dx-form ...
  • (onFieldDataChanged)="form_fieldDataChanged($event)">
  • </dx-form>
  • import { DxFormModule } from "devextreme-angular";
  • // ...
  • export class AppComponent {
  • // ...
  • form_fieldDataChanged (e) {
  • let updatedField = e.dataField;
  • let newValue = e.value;
  • // Event handling commands go here
  • }
  • }
  • @NgModule({
  • imports: [
  • // ...
  • DxFormModule
  • ],
  • // ...
  • })
See Also