mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 08:58:26 +00:00
Fix hide action options section (#3088)
- add actionLookup object for easy action type lookup - add conditional render to the Action Options section
This commit is contained in:
parent
50f5b9fa77
commit
450a4841c5
1 changed files with 7 additions and 3 deletions
|
|
@ -24,6 +24,8 @@ export const EventManager = ({
|
|||
return { name: action.name, value: action.id };
|
||||
});
|
||||
|
||||
const actionLookup = Object.fromEntries(ActionTypes.map((actionType) => [actionType.id, actionType]));
|
||||
|
||||
let alertTypes = [
|
||||
{
|
||||
name: 'Info',
|
||||
|
|
@ -157,9 +159,11 @@ export const EventManager = ({
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div className="hr-text" data-cy="action-option">
|
||||
Action options
|
||||
</div>
|
||||
{actionLookup[event.actionId].options?.length > 0 && (
|
||||
<div className="hr-text" data-cy="action-option">
|
||||
Action options
|
||||
</div>
|
||||
)}
|
||||
<div>
|
||||
{event.actionId === 'show-alert' && (
|
||||
<>
|
||||
|
|
|
|||
Loading…
Reference in a new issue