microsoft / powercat-creator-kit

This toolkit helps create well-designed Power App experiences on the web & mobile. It contains a component library; PCF controls and other utilities that increase developer productivity.
MIT License
322 stars 55 forks source link

[BUG]: Dialog OnButtonSelect property expecting record value #498

Closed packman83 closed 1 month ago

packman83 commented 2 months ago

Describe the bug The OnButtonSelect property of the Dialog component no longer accepts IF statements or UpdateContext to be used. An error occurs that the property is expecting a record value.

To Reproduce Steps to reproduce the behavior:

  1. Add Dialog component to canvas
  2. Configure OnButtonSelect property with the following code per the documentation If( Self.SelectedButton.Label = "Close", Notify("Email Sent") ); UpdateContext({ showHideDialog: false })
  3. Error displayed for 'Expected Record Value'

Expected behavior Configuring a Dialog OnButtonSelect property with IF statements and/or UpdateContext should work successfully

Screenshots image

jean-goyat commented 1 month ago

@packman83, this is probably related to the way component behavior property return type checks are now enforced by default. This is not a CreatorKit issue per say and as of yet I don't have an opinion regarding the expected return type of those OnSelect Dialog parameters... just wanted to point out a potential solution:

As a temporary measure, you can disable that check in the "retired" feature settings: image

packman83 commented 1 month ago

@jean-goyat, you are correct. I did not see that this is enforced by default now. Your suggestion to disable that check did the trick as a workaround for now.

Seeing as this is not a Creator Kit bug, marked as closed (hopefully that's ok).