Inertia Layout slot and Vue 3 composition api emit event
I have a vue 3 layout for inertia, inside this layout there is the slot in which inertia places the "vue" page. I am using the <script setup> declaration. Normally props go down and emits go up. For some reason I can't get the emit event through to the parent. I want to pass a title up to the parent to be displayed in the nav menu. I've googled my head of, but can't seem to find a working solution. Help....
@wingly Thanx for your answer. I've tried finding an example using the vue 3 composition api, but couldn't find anything usefull, naming the slot resulted in the slot not being rendered at all. If you have an example you can point me to, that would be really helpful. For now I've fallen back on an eventbus using mitt.
@gvisbeen any chance you can explain how you made this worked? I am trying to do the same I have an AuthLayout.vue that acts as the parent and every single view just displays on the slot but I can't find a way to pass an event to my AuthLayout.vue so I can decrease a badge once an action happen I one of my pages!