-
Notifications
You must be signed in to change notification settings - Fork 47
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
#1611 Filter getPropertyValues() based on the selected tab #1612
Conversation
71555f5
to
cf96cff
Compare
// All property values | ||
let propertyValues = this.propertiesStore.getPropertyValues(); | ||
|
||
if (options && options.getActiveTabControls) { |
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.
I would probably rename this to activeTabValues
instead. getActiveTabControls makes me think this is a method.
} | ||
|
||
// Recursively get all properties under given uiGroup | ||
getGroupProperties(uiGroup) { |
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.
Have you looked at this.panelTree
? I think this already has a tree of all the panels and controls within a tree. Could we use that instead of having to parse it again?
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.
@matthoward366 this.panelTree
works for most cases. But when "type": "subTabs",
, the group doesn't show up under this.panelTree
.
Example in tab_paramDef.json
, Primary3
group has "type": "subTabs",
. This group isn't listed under panelTree - https://github.com/elyra-ai/canvas/blob/main/canvas_modules/harness/test_resources/parameterDefs/tab_paramDef.json#L577
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.
Should it be? Maybe the code for the panelTree parsing isn't handling this correctly? Seems like ui-groups-parser should doing what you're trying to do here.
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.
The other question here is should document the method in the controller for getting the active tab then the consuming application should be able to do this to determine the parameters within that group.
Signed-off-by: Neha Gokhale <[email protected]>
Signed-off-by: Neha Gokhale <[email protected]>
cf96cff
to
7937d68
Compare
After discussion with DataStage team, they just need top level active tab's group id. Closing this PR. I will create a new PR for returning top level active tab group id. |
Fixes #1611
Added a new config option
getActiveTabControls
for getPropertyValues() method in properties-controller.Developer's Certificate of Origin 1.1