Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Experimental Features
Unanswered

Behavior Events not firing in library components

(0) ShareShare
ReportReport
Posted on by 29

I have a component library with a header component that has a button on it. The button OnSelect calls my coponent's OnClick method. In my app where I'm using the component, clicking on the button is not firing the OnClick method recently. This was working before (at least a week or two ago). I don't know if it's caused by a recent power apps release (maybe related to this issue: https://powerusers.microsoft.com/t5/Power-Apps-Experimental-Features/Latest-update-stops-Behavior-Events-accessing-component/m-p/2256007#M643 ?).

 

I can create a component in my Power App and the event fires for that one, but the component in my component library will not fire events (tested with two different components - both don't fire). It's also not showing the correct value of variables (they're always blank in the event expression window. I set ShowMenu to false in App.OnStart, but you can see here it looks like it is Blank:

Power Apps Component Events.png

Categories:
  • AT-01042224-0 Profile Picture
    Microsoft Employee on at
    Re: Behavior Events not firing in library components

    Please share the library that you had the issue with when you can.

    anhtruongMSFT_0-1693601238933.png

     

  • jfrenc Profile Picture
    29 on at
    Re: Behavior Events not firing in library components

    The app no longer references the component library. I could share the component library with you, but I don't see a way to export that from the Apps -> Component libraries page.

  • AT-01042224-0 Profile Picture
    Microsoft Employee on at
    Re: Behavior Events not firing in library components

    Is it possible for you to share your app and component library? I'd like to look at your setup and see if I can repro it myself.

  • jfrenc Profile Picture
    29 on at
    Re: Behavior Events not firing in library components

    @anhtruongMSFT , I'm on 3.23082.20, one version behind you. Hopefully I'll see it working again in the next version when I get updated automatically. Since I moved my components back into my app and it's working that way, I'm going to leave it as-is for now.

  • AT-01042224-0 Profile Picture
    Microsoft Employee on at
    Re: Behavior Events not firing in library components

    @jfrenc you can check and change your app/library version by going to Settings -> Support 

    anhtruongMSFT_0-1693265704442.png

     

  • jfrenc Profile Picture
    29 on at
    Re: Behavior Events not firing in library components

    Can you remind me how to check the version? I don't remember where to find that.

  • AT-01042224-0 Profile Picture
    Microsoft Employee on at
    Re: Behavior Events not firing in library components

    Hi @jfrenc , I have tried on my own with a component library and an app that have a similar set up as you have. I have a label that has Visible set to ShowMenu and my buttons are the same as yours. They are working as expected and both library and app are on 3.23083.16 version.

    complib.gif

     

  • jfrenc Profile Picture
    29 on at
    Re: Behavior Events not firing in library components

    @ShantanuP , I'm assuming you're asking me for the expression, since it's my post (RameshMukka, I hope we get it solved for your sake, too).

     

    Here is my definition of the event property:

    Event property definitionEvent property definition

    Here is the OnSelect of the icon in the component.

    Component's Button OnClickComponent's Button OnClick

     

    Here is the app using the component and setting the OnMenuClick event. This fires now that I moved the component back into my app, but it stopped working when the component was in a component library (although it had worked for a couple of months previously):

    Apps component.OnMenuClickApps component.OnMenuClick

  • rameshmukka Profile Picture
    1,091 on at
    Re: Behavior Events not firing in library components

    @ShantanuP 

    I don't have the code now. But its about having multiple patch functions on one of the component Event type properties

  • ShantanuP Profile Picture
    on at
    Re: Behavior Events not firing in library components

    Can you please share the expression on OnClick so that I can try to repro this on my end?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >

Featured topics