mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 01:18:23 +00:00
fixes: event should map with show/hide modal component id
This commit is contained in:
parent
5fccede5a2
commit
fa601d770a
4 changed files with 21 additions and 0 deletions
|
|
@ -261,6 +261,10 @@ export class MigrateAppsDefinitionSchemaTransition1697473340856 implements Migra
|
|||
eventDefinition.componentId = oldComponentToNewComponentMapping[eventDefinition.componentId];
|
||||
}
|
||||
|
||||
if (eventDefinition?.actionId == 'show-modal' || eventDefinition?.actionId === 'hide-modal') {
|
||||
eventDefinition.modal = oldComponentToNewComponentMapping[eventDefinition.modal];
|
||||
}
|
||||
|
||||
event.event = eventDefinition;
|
||||
|
||||
await manager.save(event);
|
||||
|
|
|
|||
|
|
@ -1529,6 +1529,10 @@ export class AppImportExportService {
|
|||
eventDefinition.pageId = oldPageToNewPageMapping[eventDefinition.pageId];
|
||||
}
|
||||
|
||||
if (eventDefinition?.actionId == 'show-modal' || eventDefinition?.actionId === 'hide-modal') {
|
||||
eventDefinition.modal = oldComponentToNewComponentMapping[eventDefinition.modal];
|
||||
}
|
||||
|
||||
event.event = eventDefinition;
|
||||
|
||||
await manager.save(event);
|
||||
|
|
|
|||
|
|
@ -429,6 +429,10 @@ export class AppsService {
|
|||
eventDefinition.pageId = oldPageToNewPageMapping[eventDefinition.pageId];
|
||||
}
|
||||
|
||||
if (eventDefinition?.actionId == 'show-modal' || eventDefinition?.actionId === 'hide-modal') {
|
||||
eventDefinition.modal = oldComponentToNewComponentMapping[eventDefinition.modal];
|
||||
}
|
||||
|
||||
event.event = eventDefinition;
|
||||
|
||||
await manager.save(event);
|
||||
|
|
|
|||
|
|
@ -108,6 +108,10 @@ export class PageService {
|
|||
eventDefinition.componentId = componentsIdMap[eventDefinition.componentId];
|
||||
}
|
||||
|
||||
if (eventDefinition?.actionId == 'show-modal' || eventDefinition?.actionId === 'hide-modal') {
|
||||
eventDefinition.modal = componentsIdMap[eventDefinition.modal];
|
||||
}
|
||||
|
||||
event.event = eventDefinition;
|
||||
|
||||
const clonedEvent = new EventHandler();
|
||||
|
|
@ -144,6 +148,11 @@ export class PageService {
|
|||
if (eventDefinition?.actionId === 'control-component') {
|
||||
eventDefinition.componentId = componentsIdMap[eventDefinition.componentId];
|
||||
}
|
||||
|
||||
if (eventDefinition?.actionId == 'show-modal' || eventDefinition?.actionId === 'hide-modal') {
|
||||
eventDefinition.modal = componentsIdMap[eventDefinition.modal];
|
||||
}
|
||||
|
||||
event.event = eventDefinition;
|
||||
|
||||
const clonedEvent = new EventHandler();
|
||||
|
|
|
|||
Loading…
Reference in a new issue