-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix: Subsequent nodes in the form have lost reference data #4251
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,9 +4,12 @@ class FormNode extends AppNode { | |
| constructor(props: any) { | ||
| super(props, FormNodeVue) | ||
| } | ||
| getConfig(props: any) { | ||
| return props.model.properties.config | ||
| } | ||
| } | ||
| export default { | ||
| type: 'form-node', | ||
| model: AppNodeModel, | ||
| view: FormNode | ||
| view: FormNode, | ||
| } | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The provided code looks mostly correct in terms of syntax and intent. Here's a brief analysis:
If you have specific concerns or additional requirements not covered here, feel free to let me know! |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,14 +2,16 @@ import VariableAggregationNodeVue from './index.vue' | |
| import { AppNode, AppNodeModel } from '@/workflow/common/app-node' | ||
|
|
||
| class VariableAggregationNode extends AppNode { | ||
| constructor(props: any) { | ||
| super(props, VariableAggregationNodeVue) | ||
| } | ||
| constructor(props: any) { | ||
| super(props, VariableAggregationNodeVue) | ||
| } | ||
| getConfig(props: any) { | ||
| return props.model.properties.config | ||
| } | ||
| } | ||
|
|
||
|
|
||
| export default { | ||
| type: 'variable-aggregation-node', | ||
| model: AppNodeModel, | ||
| view: VariableAggregationNode, | ||
| } | ||
| type: 'variable-aggregation-node', | ||
| model: AppNodeModel, | ||
| view: VariableAggregationNode, | ||
| } | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The provided code is mostly correct and does not contain significant irregularities or potential issues. However, there are a few optimizations you can consider:
This should make the code cleaner and more readable while maintaining its functionality. |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No significant issue was found with the provided code. A couple of improvements could be made:
getConfigmethod is correctly exporting its results from Node.js.propsdo not contain properties like 'type' or 'config'.Overall, the original code seems straightforward and performs the task as intended.