This commit is contained in:
@@ -809,7 +809,6 @@ export default {
|
|||||||
|
|
||||||
//dev error on form?
|
//dev error on form?
|
||||||
if (!formControl) {
|
if (!formControl) {
|
||||||
debugger;
|
|
||||||
throw `gzform::fieldValueChanged formControl is not found ref:${ref}, formReferences:${formReference} `;
|
throw `gzform::fieldValueChanged formControl is not found ref:${ref}, formReferences:${formReference} `;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -169,6 +169,13 @@ export default {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
window.$gz.errorHandler.handleFormError(error, vm);
|
window.$gz.errorHandler.handleFormError(error, vm);
|
||||||
} finally {
|
} finally {
|
||||||
|
// this.$nextTick(() => {
|
||||||
|
// console.log("About to set ready=true");
|
||||||
|
// vm.formState.loading = true;
|
||||||
|
// vm.formState.ready = true;
|
||||||
|
// //now release the loading
|
||||||
|
// vm.formState.loading = false;
|
||||||
|
// });
|
||||||
vm.formState.ready = true;
|
vm.formState.ready = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -195,7 +202,7 @@ export default {
|
|||||||
name: null,
|
name: null,
|
||||||
active: true,
|
active: true,
|
||||||
notes: null,
|
notes: null,
|
||||||
color: "#ffffff",
|
color: null,
|
||||||
selectRoles: 10,
|
selectRoles: 10,
|
||||||
removeRoles: 10,
|
removeRoles: 10,
|
||||||
completed: false,
|
completed: false,
|
||||||
@@ -266,7 +273,11 @@ export default {
|
|||||||
!this.formState.loading &&
|
!this.formState.loading &&
|
||||||
!this.formState.readOnly
|
!this.formState.readOnly
|
||||||
) {
|
) {
|
||||||
window.$gz.form.fieldValueChanged(this, ref);
|
//This was necessary because for some reason the color control was triggering field value changed *before* the form reference was set
|
||||||
|
//which is strange but this resolve it
|
||||||
|
if (this.$refs.form) {
|
||||||
|
window.$gz.form.fieldValueChanged(this, ref);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async getDataFromApi(recordId) {
|
async getDataFromApi(recordId) {
|
||||||
@@ -496,10 +507,8 @@ let JUST_DELETED = false;
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
async function initForm(vm) {
|
async function initForm(vm) {
|
||||||
console.log("initform A");
|
|
||||||
await fetchTranslatedText();
|
await fetchTranslatedText();
|
||||||
await window.$gz.formCustomTemplate.get(FORM_CUSTOM_TEMPLATE_KEY);
|
await window.$gz.formCustomTemplate.get(FORM_CUSTOM_TEMPLATE_KEY);
|
||||||
console.log("initform B");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////
|
||||||
|
|||||||
Reference in New Issue
Block a user