You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I'm wondering, is there a way for Phlex components to render to a location outside of where they're referenced? This would be useful for things like modals. In rails we can use content_for to fill a "slot" in the layout from a different part of the code, I'm wondering if there's a way to do that in Phlex. Right now sometimes we render the modal component inline with the button that triggers it, which is fine, but this can sometimes be a problem when the surrounding context clashes with the modal contents. (Or e.g., if we're already inside a <form> tag and the modal contains another one.)
If not already possible, is this something Phlex would consider adding?
Thanks!
Ninja edit: I guess at least in a Rails context we can use the content_for helper already, so maybe that's enough for me...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! I'm wondering, is there a way for Phlex components to render to a location outside of where they're referenced? This would be useful for things like modals. In rails we can use
content_forto fill a "slot" in the layout from a different part of the code, I'm wondering if there's a way to do that in Phlex. Right now sometimes we render the modal component inline with the button that triggers it, which is fine, but this can sometimes be a problem when the surrounding context clashes with the modal contents. (Or e.g., if we're already inside a<form>tag and the modal contains another one.)If not already possible, is this something Phlex would consider adding?
Thanks!
Ninja edit: I guess at least in a Rails context we can use the
content_forhelper already, so maybe that's enough for me...Beta Was this translation helpful? Give feedback.
All reactions