Actions inside a custom component

Hi guys. I am trying to create a custom component used in all my views. I am able to create a button and a popover inside my component. I order to show the popover, I need to create an Action and connect that to the event handler on the button. That works fine. The problem appears when I want to connect the Action to the Popover. The Action in which I must create in the project (would very much like to have local actions in a custom control), does not see the popover because it’s inside the custom control. One way to solve this, is to create a copy of the popover in each and every view in the app. That would work, but is a VERY lousy solution because it require both an Action per view and also a popover per view.
Any suggestions to a better solution?
Øystein

Hi @Oystein_Selbekk
Unfortunately it is not possible to use a popover in a shared component. We are working on a concept for this, but we do not have a date for this yet.
Could it be an option to use a dialog instead of a popover for your use-case?

Hi Karl and thank you for the reply. A dialog would not be suitable in this case. I am waiting eagerly for a solution her then :slight_smile:
Øystein

We are here to help :smiley:
Depending on the details of your use-case:
One option could be to create a shared component which behaves like a popover. You could use a container with absolute position and a high z-index to achieve a container that floats over the content below the “popover”-trigger.

1 Like

Hi again Karl and thank you for the reply. I will test out the suggested approach :slight_smile: