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

static non-attr bindings does not work in SSR #7476

Closed
sapphi-red opened this issue Jan 6, 2023 · 2 comments
Closed

static non-attr bindings does not work in SSR #7476

sapphi-red opened this issue Jan 6, 2023 · 2 comments
Labels
has workaround A workaround has been found to avoid the problem 🔩 p2-edge-case scope: ssr

Comments

@sapphi-red
Copy link
Contributor

Vue version

3.2.45

Link to minimal reproduction

https://sfc.vuejs.org/#__SSR__eNp9j81OwzAQhF9l8SUgNbb4u1RpVW68ARdf2mTbmMY/Wm8KKPK74yQIlSL1ODPrb8aDeAlBnnoUS1HFmkxgiMh9WGtnbPDEMADhHhLsyVso8mmhnXa1d5HBxgOsxvy2eMWu8/DmqWtuijvtKjXjMigLRhu6LWNWAFV7vx6G6XFKlcpqco0LPQN/BVxpUbdYH3f+UwswrkFGssbNgEr90sRCzCtLuw3yPXqX/zGMNP0TRC2WMDmjl9ePWouWOcSlUr0Lx4OsvVWbnCnqHRuLZePt5lE+yKdn1ZjI577EaMsd+Y+IlBu1WJzBVTZPSCVh3kxIV8subv8UXmT/SsfOpF0S6RsbbJwU

Steps to reproduce

  1. Open minimal reproduction

What is expected?

checkbox is shown in indeterminate state like in non-SSR.
image

What is actually happening?

checkbox is shown in non-checked state.
image

System Info

No response

Any additional comments?

<input type="checkbox" :indeterminate="true"> doesn't work as well.
I think #1128 is related.

I noticed this while checking whether props and attrs works differently in vue.

@LinusBorg
Copy link
Member

LinusBorg commented Jan 6, 2023

A checkbox cannot be set to indeterminate state by an HTML attribute - it must be set by a JavaScript.
https://www.w3schools.com/jsref/prop_checkbox_indeterminate.asp

So ab immediate workaround would be to write a custom directive for this.

We can look into wether this warrants special handling in hydration.

@edison1105
Copy link
Member

see vuejs/vue#4094

@github-actions github-actions bot locked and limited conversation to collaborators Nov 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
has workaround A workaround has been found to avoid the problem 🔩 p2-edge-case scope: ssr
Projects
None yet
Development

No branches or pull requests

3 participants