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

[Feature]: Panel Component Buttons need to have visible / enabled features #268

Closed
Jenefer-Monroe opened this issue Jan 14, 2023 · 6 comments
Assignees
Labels
🛠️ enhancement New feature or request

Comments

@Jenefer-Monroe
Copy link

**Is this request for a new component, or additional functionality for an existing component? **
Additional functionality for an existing component

Have you validated that your desired feature or component is not already in the backlog?
Backlog by this link appears empty, let me know if I'm missing something.

Describe the component and functionality you would like to see in the starter kit
Panel Component Button Properties: https://learn.microsoft.com/power-platform/guidance/creator-kit/panel#buttons-properties

Currently can only set label and Button type.
In order for this component to really be reusable for a large and varried list of objects I need to be able to show or hide buttons based on state.

Current example is the screen in the CoE to configure env vars. When there is no value, as shown here, then Revert should be hidden as there is nothing to revert to

image

Describe alternatives you've considered
What I do now is throw an alert if they hit it.

@slaouist
Copy link
Collaborator

@Jenefer-Monroe. Removing the content of the property "Buttons" should hide the list. Works on Dialog and should work similarly on panel.

@slaouist
Copy link
Collaborator

new Buttons schema:
Table({Label: "Cancel", ButtonType:'Microsoft.CoreControls.Button.ButtonType'.Standard , Visible:true, Enabled:false} ,{Label: "Ok", ButtonType:'Microsoft.CoreControls.Button.ButtonType'.Primary, Visible:true, Enabled:false})

@slaouist
Copy link
Collaborator

fixed this for next release as well: "@Jenefer-Monroe. Removing the content of the property "Buttons" should hide the list. Works on Dialog and should work similarly on panel."

@slaouist slaouist assigned slaouist and unassigned denise-msft Jan 30, 2023
@slaouist slaouist added the 🛠️ enhancement New feature or request label Jan 30, 2023
@slaouist slaouist added this to the Creator Kit - February 2023 milestone Jan 30, 2023
@Jenefer-Monroe
Copy link
Author

new Buttons schema: Table({Label: "Cancel", ButtonType:'Microsoft.CoreControls.Button.ButtonType'.Standard , Visible:true, Enabled:false} ,{Label: "Ok", ButtonType:'Microsoft.CoreControls.Button.ButtonType'.Primary, Visible:true, Enabled:false})

Thank you so much! This is exactly what I wanted!!!

@mikefactorial
Copy link
Contributor

@Jenefer-Monroe This has been fixed in the latest release.

@dancohenenterprise
Copy link

Updating to the latest Panel / Dialog components now require the Visible and Enabled properties to function properly. The previous schema did not offer/require these properties. This was unexpected, as after upgrading the components, no errors were apparent, but the buttons did not show.

Please update the main documentation: https://learn.microsoft.com/en-us/power-platform/guidance/creator-kit/panel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🛠️ enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants