Added support for arrays result in events table
This commit is contained in:
parent
c4cb741e86
commit
2d637558ae
@ -478,7 +478,12 @@ export class EventTableConfig extends EntityTableConfig<Event, TimePageLink> {
|
|||||||
}
|
}
|
||||||
if (contentType === ContentType.JSON && sortKeys) {
|
if (contentType === ContentType.JSON && sortKeys) {
|
||||||
try {
|
try {
|
||||||
content = JSON.stringify(sortObjectKeys(JSON.parse(content)));
|
const parsedContent = JSON.parse(content);
|
||||||
|
if (Array.isArray(parsedContent)) {
|
||||||
|
content = JSON.stringify(parsedContent.map(item => item && typeof item === 'object' ? sortObjectKeys(item) : item));
|
||||||
|
} else {
|
||||||
|
content = JSON.stringify(sortObjectKeys(parsedContent));
|
||||||
|
}
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
}
|
}
|
||||||
this.dialog.open<EventContentDialogComponent, EventContentDialogData>(EventContentDialogComponent, {
|
this.dialog.open<EventContentDialogComponent, EventContentDialogData>(EventContentDialogComponent, {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user