I think David means data: { name: "Why Data" } in Detail.vue does not bind to the props in SimpleModal.vue. The default values are used in the Modal.
I have the same problem and get the warning:
[Vue warn]: Extraneous non-props attributes (data) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.
I tried to figure it out myself, but am a little bit stuck by now.
have you looked at the updated code sample referenced above? This post is over a year old and ionic has changed how they manage modals. If you have a code sample project somewhere I am happy to take a look
I have changed
data: {
name: "Why Data"
}
into
data: {
title: "Why Data"
}
but both do not show "Why Data" in the title of the modal, but "Super Modal" instead.
I run Ionic Framework : @ionic/vue 5.5.2 with vue@3.0.4
not sure I understand the question?
Also, I don't create modals this way anymore, I use the template approach, I find it to be much cleaner
Take a look here: github.com/aaronksaunders/ionic-vu...
I think David means data: { name: "Why Data" } in Detail.vue does not bind to the props in SimpleModal.vue. The default values are used in the Modal.
I have the same problem and get the warning:
[Vue warn]: Extraneous non-props attributes (data) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.
I tried to figure it out myself, but am a little bit stuck by now.
have you looked at the updated code sample referenced above? This post is over a year old and ionic has changed how they manage modals. If you have a code sample project somewhere I am happy to take a look
Yes, I have cloned the project with updated code from github.com/aaronksaunders/ionic-vu....
I have changed
data: {
name: "Why Data"
}
into
data: {
title: "Why Data"
}
but both do not show "Why Data" in the title of the modal, but "Super Modal" instead.
I run Ionic Framework : @ionic/vue 5.5.2 with vue@3.0.4
to change the title of the modal, you need to set the modals title property, you are changing the data property which has no impact on the modal
I think you mean:
props: {
title: { type: String, default: "Super Modal" }
},
But how do I change this using parameters from detail.vue?
Thank you, it's working now.
Thanks, please like and subscribe to my YouTube channel, trying to get my subscribers over 2000!! And you will get updated when I push new content