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

Condition on template with v-if using v-slot prop #10784

Closed
julaudo opened this issue Oct 31, 2019 · 3 comments
Closed

Condition on template with v-if using v-slot prop #10784

julaudo opened this issue Oct 31, 2019 · 3 comments

Comments

@julaudo
Copy link

julaudo commented Oct 31, 2019

Version

2.6.10

Reproduction link

https://codepen.io/jaudo/pen/MWWOeBp?&editable=true&editors=101#anon-signup

Steps to reproduce

Launch the codepen

What is expected?

No error should appear. The template should be active only for items having loading = true

What is actually happening?

An error appears : item is undefined while evaluating item.loading

@Justineo
Copy link
Member

Hi, please provide a minimal reproduction. That means no 3rd party libraries should be included, eg. Vuetify.

@posva posva closed this as completed Oct 31, 2019
@julaudo
Copy link
Author

julaudo commented Oct 31, 2019

Thank you for your answer but this is not a good solution, because the component can have specific behaviour depending on the presence of the slot (as explained in my example with vuetify)

grolu added a commit to gardener/dashboard that referenced this issue May 25, 2020
…sion in Vue 2.6

The new v-slot directive, does not provide access to the slotProps to use in an v-if to overwrite the slot conditionally and have the default (fallback) slot content rendered otherwise.
See also these related issues:
vuejs/vue#10784
vuejs/vue#9725
vuejs/vue#9658
grolu added a commit to gardener/dashboard that referenced this issue May 26, 2020
* Ensure that member roles currently not supported by the dashboard don't get lost when updating a member
Fixed autofocus for some dialogs

* changes as discussed

* revert

* Fix secret access in slots

* Revert "Fix secret access in slots"

This reverts commit 90cc626.

* Fixed secret page, had to move code to parent component due to regression in Vue 2.6
The new v-slot directive, does not provide access to the slotProps to use in an v-if to overwrite the slot conditionally and have the default (fallback) slot content rendered otherwise.
See also these related issues:
vuejs/vue#10784
vuejs/vue#9725
vuejs/vue#9658
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants