Skip to content

Commit

Permalink
Merge pull request #1820 from dhis2/fix/create-registration-form
Browse files Browse the repository at this point in the history
fix: registration form displayName
  • Loading branch information
Birkbjo authored Mar 22, 2021
2 parents d1bb36a + 4a10ce6 commit 5067329
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ const addProgramSection = store => action$ => action$
// Create new section model and set the properties we can
const newSection = d2.models.programSection.create({ id: generateUid() });
newSection.name = newSectionData.name;
newSection.displayName = newSectionData.name;
// this is just used to show edited name immediately, not sent to serv
// cannot change dispayName directly as it does not have a setter (writable: false)
newSection.dataValues.displayName = newSectionData.name;
newSection.description = newSectionData.description;
newSection.renderType = newSectionData.renderType;
newSection.sortOrder = sortOrder;
Expand Down

0 comments on commit 5067329

Please sign in to comment.