-
Notifications
You must be signed in to change notification settings - Fork 81
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
NcButton
fails to compile without direct text content in default slot
#3824
Comments
@Antreesy Can you check if it works (better) with v7.6.0 for you? In #3726, which is included in the 7.6.0 release, we moved to a render function, which doesn't anymore use the code you show. In the docs https://nextcloud-vue-components.netlify.app/#/Components/NcButton wrapping the default slot text in a |
Sorry, @raimund-schluessler, I made a reference from an old version, but in 7.7.1 runtime error still remains (updated example)
Guess, it's the question to the NcButton behavior. I found it quite inconvenient to wrap a child component to |
Alright, thanks for checking. I guess the warning is only shown in development mode and the docs run in production. Checking if text is undefined is a good idea, I think.
I think I don't really understand what you want to do. Can you show an example of what you intent to do, please? We generally try to keep everything consistent, so overwriting the style of a component should really only be done in edge cases, I would say. |
Ah, you mean to just put the content of the default slot where we currently put the text string? That would be fine with me, but I think it collides with the original intention of limiting the way the Nevertheless, here is the fix for the first part of the issue: #3827 |
Issue raised because of computed value
text()
inNcButton
, which doesn't consider result of computed valuehasText()
properlyProposal to discuss:
replace line:
with:
The text was updated successfully, but these errors were encountered: