|
|
|
@ -41,7 +41,7 @@ const EventSelect: React.FC<EventSelectProps> = ({ nodeData, eventList, type, on
|
|
|
|
setCurrentEvent(null);
|
|
|
|
setCurrentEvent(null);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
setCurrentEvent(eventList.find(item => customDef.eventId === item.id));
|
|
|
|
setCurrentEvent(eventList.find(item => customDef.eventId === item.eventId));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (e) {
|
|
|
|
} catch (e) {
|
|
|
|
// 先判断topic是不是**empty**,是就不设置currentevent
|
|
|
|
// 先判断topic是不是**empty**,是就不设置currentevent
|
|
|
|
@ -49,7 +49,7 @@ const EventSelect: React.FC<EventSelectProps> = ({ nodeData, eventList, type, on
|
|
|
|
setCurrentEvent(null);
|
|
|
|
setCurrentEvent(null);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
setCurrentEvent(eventList.find(item => nodeData.component?.customDef.eventId === item.id));
|
|
|
|
setCurrentEvent(eventList.find(item => nodeData.component?.customDef.eventId === item.eventId));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -85,7 +85,7 @@ const EventSelect: React.FC<EventSelectProps> = ({ nodeData, eventList, type, on
|
|
|
|
const data = {
|
|
|
|
const data = {
|
|
|
|
type: typeMap[type],
|
|
|
|
type: typeMap[type],
|
|
|
|
customDef: {
|
|
|
|
customDef: {
|
|
|
|
eventId: e.id,
|
|
|
|
eventId: e.eventId,
|
|
|
|
name: e.name,
|
|
|
|
name: e.name,
|
|
|
|
topic: e.topic
|
|
|
|
topic: e.topic
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -126,7 +126,7 @@ const EventSelect: React.FC<EventSelectProps> = ({ nodeData, eventList, type, on
|
|
|
|
dropdownMenuStyle={{ maxHeight: 300 }}
|
|
|
|
dropdownMenuStyle={{ maxHeight: 300 }}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
{options.map((option) => (
|
|
|
|
{options.map((option) => (
|
|
|
|
<Option key={option.id} value={option}>
|
|
|
|
<Option key={option.eventId} value={option}>
|
|
|
|
{option.name}
|
|
|
|
{option.name}
|
|
|
|
</Option>
|
|
|
|
</Option>
|
|
|
|
))}
|
|
|
|
))}
|
|
|
|
|