Skip to content

Commit

Permalink
Fix: New records, joined relation values not retrieved
Browse files Browse the repository at this point in the history
  • Loading branch information
r3-gabriel committed Jul 26, 2024
1 parent 9fd0495 commit ebb031c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions www/comps/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,14 @@ let MyForm = {
this.valuesNew = {};
this.valuesOld = {};
this.get();

// for new records: apply defaults to update joins
if(this.isNew) {
for(const ia in this.valuesDef) {
if(this.valuesDef[ia] !== null)
this.valueSet(ia,this.valuesDef[ia],true,true);
}
}

if(!this.isWidget && !this.isMobile)
this.$nextTick(() => this.fieldSetFocus(this.form.fieldIdFocus,true));
Expand Down

0 comments on commit ebb031c

Please sign in to comment.