-
Notifications
You must be signed in to change notification settings - Fork 51
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
[BUG]: Dialog control doesn't re-evaluate the Button property #474
Comments
Are you using the latest version of the Creator Kit (May)? Note: If you are not, do not upgrade if this app is in production. See announcement for more details. |
No, I didn't install the "20240529.1" version as recommended in the announcement. I still have the 20230727.2 version. Are you suggesting my exact issue is fixed in the latest versions? Is the June 24 version release yet? |
@ericregnie I was suggesting that the issue may have been fixed in the latest version. If you are still seeing this issue, can you please upgrade to the latest version of the Creator Kit and validate if that fixes the issue? |
@denise-msft just upgraded and tried. Still doesn't work, the buttons are not re-evaluated |
Description
The dialog control doesn't support dynamic buttons. The Button property is only evaluated once and cannot set some logic (i.e. condition).
To Reproduce
Example steps to reproduce the behavior:
Assuming there's a canvas app with containing dialog control
Set the Buttons property to:
If(IsConfirmationDialog, Table({ Label: "Cancel", ButtonType:'Microsoft.CoreControls.Button.ButtonType'.Standard } , { Label: "Confirm", ButtonType:'Microsoft.CoreControls.Button.ButtonType'.Primary }) , Table({ Label: "Ok", ButtonType:'Microsoft.CoreControls.Button.ButtonType'.Primary }) )
Have a dummy button that toggles the
IsConfirmationDialog
variable to true/false:UpdateContext({IsConfirmationDialog: true})
Runt he app, toggle the dummy button and open the dialog
Expected behavior
Confirm and Cancel buttons appear only when
IsConfirmationDialog
is true and Ok button whenIsConfirmationDialog
is false.Actual behavior
It seems like the Buttons property is only evaluated once at runtime, and never again. Using the repro steps example,
If
IsConfirmationDialog
was false at runtime then only the Ok button will be visible and will never show Confirm/Cancel even when 'IsConfirmationDialog' was updated to true. And vice-versa, ifIsConfirmationDialog
was true at runtime, Confirm/Cancel buttons will also show.AB#3514
The text was updated successfully, but these errors were encountered: