Milos Pavic
ย ยทย Freelancer

Bubbling events from component to the instance

Hello

Im aware of passing action to the component as custom action property

I wish to build button as component where in component is defined close drawer. Then i wish to use that button instance and assign action navigate to page.

The problem is need to pass custom action to the component from instance (i don't wish to do that) i wish to keep standard practice at instance onTap event add action navigate to page.

Component onTap will close drawer, instance onTap will navigate to page.

If i do this way component onTap => close drawer, instance onTap =>navigate to page, my instance event never bubbles even if i add 1000ms delay (wait) on the component onTap event before drawer close.

WHY

If i do special tricks/parameters/actions on button as instance => component, somebody later wont pass custom event to it and app navigation wont work.

1 reply