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

[FR] App config to set inheritAttrs: false globally #8542

Closed
wenfangdu opened this issue Jun 11, 2023 · 2 comments
Closed

[FR] App config to set inheritAttrs: false globally #8542

wenfangdu opened this issue Jun 11, 2023 · 2 comments
Labels
✨ feature request New feature or request

Comments

@wenfangdu
Copy link

What problem does this feature solve?

The default behavior inheritAttrs: true is almost never the desired case for encapsulating components, I have to set inheritAttrs: false for pretty much all components that I write in real projects. I understand making inheritAttrs: false the default would be a huge breaking change: vuejs/rfcs#26, but at least provide an option to set inheritAttrs: false globally for all components.

What does the proposed API look like?

app.config.inheritAttrs = false

@wenfangdu wenfangdu added the ✨ feature request New feature or request label Jun 11, 2023
@sxzz
Copy link
Member

sxzz commented Jun 11, 2023

I believe that most userland applications require inherited attributes. Like Only 8 files have inheritAttrs set in Elk.

Perhaps we could include an option to change its default behavior.

@Justineo
Copy link
Member

This affects all Vue components inside an app including third-party ones. I'd say setting inheritAttrs: false at global level has a fairly big chance to break some of them but the problem it brings can be very hard to identify and locate.

@wenfangdu wenfangdu closed this as not planned Won't fix, can't repro, duplicate, stale Jun 21, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Sep 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
✨ feature request New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants