Commit 6e7ea527 authored by Nicole Cordes's avatar Nicole Cordes Committed by Daniel Goerz
Browse files

[BUGFIX] Correctly remove added items from unique selectbox

This patch adds the current selected value in the parents selectbox if no
uid is set in its data attributes. This ensures that the value is removed
from the option list on adding the inline element.

Resolves: #91863
Releases: master, 10.4
Change-Id: I9adb35208dbf4f80db12b766ff273aaa27927a6d
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/65084


Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Nicole Cordes's avatarNicole Cordes <typo3@cordes.co>
Tested-by: Daniel Goerz's avatarDaniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Nicole Cordes's avatarNicole Cordes <typo3@cordes.co>
Reviewed-by: Daniel Goerz's avatarDaniel Goerz <daniel.goerz@posteo.de>
parent ee7500a2
......@@ -285,7 +285,9 @@ class InlineControlContainer {
objectId += Separators.structureSeparator + this.dataset.recordUid;
}
me.importRecord([objectId], this.dataset.recordUid);
const recordUid = this.dataset.recordUid ?? (me.container.querySelector(Selectors.createNewRecordBySelectorSelector) as HTMLInputElement)?.value
me.importRecord([objectId, recordUid]);
}
}).delegateTo(this.container, Selectors.createNewRecordButtonSelector);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment