[BUG]: Dialog control doesn't re-evaluate the Button property #474
Labels
bug
Something isn't working
canvas
Issue is related to a Canvas app custom component.
Component: Dialog
Milestone
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: