Standardized custom controls to fire input event instead of changed which is immediate for ui

renamed onChange handler code to better reflect what it does
tested all controls on widget form to ensure they update and roundtrip properly and dirty checking is now fired immediately no need to tab off
This commit is contained in:
2020-03-26 23:42:37 +00:00
parent 091e6329dc
commit b9fa360d33
14 changed files with 64 additions and 74 deletions

View File

@@ -165,12 +165,12 @@ export default {
//nothing
return window.$gz.form;
},
onChange(ref) {
fieldValueChanged(ref) {
if (
!this.parentVM.formState.loading &&
!this.parentVM.formState.readOnly
) {
window.$gz.form.onChange(this.parentVM, ref);
window.$gz.form.fieldValueChanged(this.parentVM, ref);
}
},
templateHasVisibleCustomFields() {
@@ -286,12 +286,14 @@ export default {
//emit the new data so it syncs with the parent source
var ret = JSON.stringify(cData);
//THis is absolutely required or it won't save any changes, no idea why though
this.$emit("update:value", ret);
//this.$emit("input", ret); //always in UTC
//this seemed to be required previously but I went to change only and it seems to work fine in testing so sticking with change
//for consistency
//this.$emit("update:value", ret);
//this triggers the onchange routine in the parent form
//so that the dirty checking works
this.$emit("change", ret);
// this.$emit("change", ret);
this.$emit("input", ret);
}
},
computed: {