Fix modal header display name so it keeps the old one

This commit is contained in:
soupette 2019-11-22 15:59:18 +01:00
parent b9ffe9de46
commit 6867ca553e

View File

@ -272,7 +272,11 @@ const FormModal = () => {
try {
await checkFormValidity();
const nextSearch = `modalType=chooseAttribute&forTarget=${state.forTarget}&targetUid=${uid}&headerDisplayName=${modifiedData.name}`;
const nextSearch = `modalType=chooseAttribute&forTarget=${
state.forTarget
}&targetUid=${uid}&headerDisplayName=${state.headerDisplayName ||
modifiedData.name}`;
if (state.modalType === 'contentType') {
// Create the content type schema