Skip to content

Commit bf4920e

Browse files
authored
fix: update webhook trigger's code example and custom UI on auth change (#3135)
## Description fixes #2995 This makes the webhook trigger settings sidebar render its custom UI using the current form configuration rather than the saved node config. As a result, the auth method, code example, and reset token/signature controls update immediately when the user changes the Authentication dropdown, without requiring a canvas save. ## Before [before-dynamic-update.webm](https://github.com/user-attachments/assets/f6e20012-6c5e-4460-8aab-5871f73abf8f) --- ## After [after-dynamic-update.webm](https://github.com/user-attachments/assets/25774038-f012-45fa-8bd8-ed9b3550b253) --------- Signed-off-by: devroy10 <[email protected]>
1 parent 56ffb58 commit bf4920e

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

web_src/src/pages/workflowv2/index.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2829,8 +2829,17 @@ export function WorkflowPageV2() {
28292829
} = onRun ? { onRun } : {};
28302830
if (integration) context.integration = integration;
28312831

2832-
return () => {
2833-
return renderer.render(buildNodeInfo(node), Object.keys(context).length > 0 ? context : undefined);
2832+
// Return a function that takes the current configuration
2833+
return (configuration?: Record<string, unknown>) => {
2834+
const nodeWithConfiguration = {
2835+
...node,
2836+
configuration: configuration ?? node.configuration,
2837+
};
2838+
2839+
return renderer.render(
2840+
buildNodeInfo(nodeWithConfiguration),
2841+
Object.keys(context).length > 0 ? context : undefined,
2842+
);
28342843
};
28352844
},
28362845
[canvas],

0 commit comments

Comments
 (0)