This repository is used for customer feedback regarding Telerik UI for NativeScript. The issues system here is used by customers who want to submit their feature requests or vote for existing ones.
Other
115
stars
21
forks
source link
RadDataForm commit data and set another editor after validate not working #1136
When I commit data and set another editor text and after try validate not working.
"nativescript-ui-dataform": "^4.0.0",
"nativescript": "~5.3.2",
I must update another editor text if committed field value.
Thnx
Miklos
public dfPropertyCommit(args): void {
let entityProperty: EntityProperty = args.entityProperty;
let fieldName: string = entityProperty.name;
if (OrderFormComponent.checkIfZipField(fieldName)) {
if (this.helperService.hasInternetConnection()) {
this.setZipFieldData(args);
}
}
}
private setZipFieldData(args): void {
let entityProperty: EntityProperty = args.entityProperty;
let fieldValue: string = entityProperty.valueCandidate;
let cityFieldName = entityProperty.name.replace('Zip', 'City');
let form = args.object;
this.cityService.getCityByZip(fieldValue)
.subscribe(
(res) => {
if (res) {
if (form.editedObject && res.result) {
//this.orderFormComp.dataForm.commitMode = DataFormCommitMode.Manual;
//this.orderFormComp.dataForm.validationMode = DataFormValidationMode.Manual;
let object: OrderFormData = JSON.parse(form.editedObject);
object[cityFieldName] = res.result;
this._orderFormData = object;
//this.orderFormComp.dataForm.reload();
form.validateAll()
.then(result => {
//console.dir(result);
//result === true ? this.formIsValid(true) : this.formIsValid(false);
});
}
}
},
err => {
console.dir(err);
}
);
}
Dear Support!
When I commit data and set another editor text and after try validate not working. "nativescript-ui-dataform": "^4.0.0", "nativescript": "~5.3.2", I must update another editor text if committed field value. Thnx Miklos