emmanuelsw / notiwind

A headless Vue 3 notification library to use with Tailwind CSS.
https://notiwind-demo.netlify.app
MIT License
277 stars 28 forks source link

NotificationGroup: fix extraneous non-props warning in Vue 3.5+ #49

Open Nebual opened 1 month ago

Nebual commented 1 month ago

This change fixes a warning when used in Vue 3.5+.

Vue's devtools auto add a data-v-inspectorprop to components as a form of Sourcemap. As of Vue 3.5+, for NotificationGroup this was causing a warning of 'Extraneous non-props attributes ("data-v-inspector") were passed to component but could not be automatically inherited because component renders fragment or text root nodes.'

Similar to this Nuxt PR, this PR disables 'automatically inherit attributes', as by default in Vue extra attributes added to <NotificationGroup something="x"> would attempt to add something as an attribute on the root node, but NotificationGroup's root node is a <template> which can't receive attributes.

aidenmarkus commented 1 month ago

Thank you! This will fix the issue we currently have.