carlsverre / react-outlet

Bottom-up Transclusion for React
MIT License
71 stars 12 forks source link

How to include multiple times into single outlet #6

Closed vlsergeyatsbt closed 7 years ago

vlsergeyatsbt commented 7 years ago

Hi!

I'm using Outlet / Plug to include buttons from forms (middle of the screen) to top toolbar panel (at the top of the screen). It works perfectly.

However, once i tried to put second form on the screen. But it's Plug replaced Plug from first form, so i can see toolbar buttons only from second form, not both.

Is there a way to allow include multiple Plugs into single Outlet?

v.1.0.6

Best regards, Sergey

KenLSM commented 7 years ago

Plugs and Outlets have a 1:1 relationship. Having multiple plugs to a single outlet violates this rule.

You could try creating another outlet for that other plug.

vlsergeyatsbt commented 7 years ago

But second outlet need to have another ID. Is there a way to do something like:

carlsverre commented 7 years ago

@vlsergeyatsbt sorry for the huge delay! I added a way to check the registry to see if an Outlet ID is currently occupied. Let me know if that solves your use-case.