Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persistent layouts doesn't work in Vue 3 #527

Closed
buismaarten opened this issue Feb 28, 2021 · 5 comments
Closed

Persistent layouts doesn't work in Vue 3 #527

buismaarten opened this issue Feb 28, 2021 · 5 comments
Labels
vue 3 Related to the vue 3 adapter

Comments

@buismaarten
Copy link

Versions:

  • @inertiajs/inertia version: 0.8.5
  • @inertiajs/inertia-vue3 version: 0.3.5

Describe the problem:

Using persistent layouts gives the following error:

Error: Codegen node is missing for element/if/for node. Apply appropriate transforms first.

Steps to reproduce:

Switch from the layout component used in template to layout defined in component object.

@buismaarten buismaarten added the vue 3 Related to the vue 3 adapter label Feb 28, 2021
@reinink
Copy link
Member

reinink commented Mar 1, 2021

Can you please share your code? In particular, can you share:

  1. Your app.js file
  2. Your page component file
  3. Your layout file

I've been using persistent layouts without issue with the Vue 3 adapter, so I'm not convinced this is actually a bug.

@buismaarten buismaarten changed the title [BUG] Persistent layouts doesn't work in Vue 3 Persistent layouts doesn't work in Vue 3 Mar 1, 2021
@buismaarten
Copy link
Author

Sure!

I've shared the files using a GitHub Gist: https://gist.github.com/buismaarten/469d45f23134436bd596134c0126a420

@reinink
Copy link
Member

reinink commented Mar 1, 2021

@buismaarten This appears to be the working code (it's not using persistent layouts). Can you share the code that doesn't work?

@reinink
Copy link
Member

reinink commented Mar 1, 2021

Wait, I see the issue here. You're using named slots. See #171.

If you need named slots, you'll need to use regular layouts, not persistent layouts. Feel free to join in the discussion in the existing issue.

Closing this, as it's a duplicate.

@reinink reinink closed this as completed Mar 1, 2021
@buismaarten
Copy link
Author

Sorry, in the Gist I shared I accidentally shared the regular layout approach because I reverted the change.

I see... thanks for clarifying!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vue 3 Related to the vue 3 adapter
Projects
None yet
Development

No branches or pull requests

2 participants