-
Notifications
You must be signed in to change notification settings - Fork 65
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
Rendering wrong icon using computed prop #350
Comments
I just faced the same issue somewhere else: <UInput
v-model="input.email"
:icon="
session.data?.user.emailVerified
? 'tabler:rosette-discount-check'
: 'tabler:rosette-discount-check-off'
"
:color="session.data?.user.emailVerified ? 'green' : 'red'"
disabled
/> It is always showing the first one: 'tabler:rosette-discount-check' There is definitely a caching or rendering issue with nuxt icon |
Indeed, just came across this issue @josselinonduty There is a cache directory. Run |
Did not work for me. I emptied the cache, reloaded the server, the issue is still there |
Fixed it (but seems more like a hack)
icon: {
clientBundle: {
icons: [
"tabler:home",
"tabler:list",
"tabler:user-plus",
"tabler:user",
"tabler:logout",
"tabler:rosette-discount-check",
"tabler:rosette-discount-check-off",
],
},
}, I don't like this approach though. Also, the wrong icon flashes before the correct one appears. |
Icons an not rendering correctly when using conditional or computed links.
I am creating a conditional horizontal navigation (using Nuxt UI v2.21.0 and Nuxt icon).
session
is a ref provided by better auth. It is empty on first load, and is then hydrated.Screenshots:
Before login:
After login:
In fact, when I go into iconify css class definition, this is what I get:
I let you check, but it is the wrong icon. There is some kind of rendering mismatch.
This first issue is not a very good one. I didn't really know what to provide. Please ask me questions if you need more context information.
The text was updated successfully, but these errors were encountered: