Replies: 1 comment 3 replies
-
It looks like you're using peeling as a signal for a successful overlay interaction. For that we already have the concept of accepting an overlay. There is also an |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Peeling layers is often used when a "dismiss overlay" is issued from a successful form submission from an overlay targeting the parent layer (https://unpoly.com/closing-overlays#peeling).
In order to listen to this behavior in the parent layer, one should subscribe to the "up:layer:dismissed" and check if the value equals to ":peel". It would be handy to have this case mapped to a dedicated event/attribute. On my project, I created this macro:
And I use it like this on my view/template/html:
Maybe my macro is not the best, but it made my templates clearer and it would be handy to have such behavior as a native Unpoly attribute.
Beta Was this translation helpful? Give feedback.
All reactions