Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent multiple actions from executing #8031

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
11 changes: 6 additions & 5 deletions source/nodejs/adaptivecards-react/src/adaptive-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,12 @@ export const AdaptiveCard = ({
}
break;
}
}
// TODO: Why is there a global action handler when we have specific
// handlers for the above cases? Can we simplify to one approach?
if (onExecuteAction) {
onExecuteAction(a);
case AdaptiveCards.ExecuteAction.JsonTypeName: {
if (onExecuteAction) {
onExecuteAction(a);
}
break;
}
}
},
[onActionOpenUrl, onActionShowCard, onActionSubmit, onExecuteAction]
Expand Down