Skip to content

Commit 16eeba4

Browse files
committed
The derived Title was being set too early which caused it to overwrite the one defined in the schema when updateInputOptions ran. Moved the setting the of title later in the stack so that updateInputOptions runs first
1 parent 7868255 commit 16eeba4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/lib/src/shared/layout.functions.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,6 @@ export function buildLayout(jsf, widgetLibrary) {
167167
const LastKey = JsonPointer.toKey(newNode.dataPointer);
168168
if (!newNode.name && isString(LastKey) && LastKey !== '-') {
169169
newNode.name = LastKey;
170-
if (!newNode.options.title && !/^\d+$/.test(newNode.name)) {
171-
newNode.options.title = fixTitle(newNode.name);
172-
}
173170
}
174171
const shortDataPointer = removeRecursiveReferences(
175172
newNode.dataPointer, jsf.dataRecursiveRefMap, jsf.arrayMap
@@ -255,6 +252,10 @@ export function buildLayout(jsf, widgetLibrary) {
255252
updateInputOptions(newNode, {}, jsf);
256253
}
257254

255+
if (!newNode.options.title && !/^\d+$/.test(newNode.name)) {
256+
newNode.options.title = fixTitle(newNode.name);
257+
}
258+
258259
if (hasOwn(newNode.options, 'copyValueTo')) {
259260
if (typeof newNode.options.copyValueTo === 'string') {
260261
newNode.options.copyValueTo = [newNode.options.copyValueTo];

0 commit comments

Comments
 (0)