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

Nuxt hydration node mismatch when using radio and checkbox together #987

Closed
joshua1dg opened this issue Oct 11, 2023 · 0 comments
Closed
Assignees
Labels
🐛 bug Verified bug by team 🟡 priority-2 2. Medium priority issue 🚀 release-ready Feature or fix is complete and on an upcoming release branch

Comments

@joshua1dg
Copy link

joshua1dg commented Oct 11, 2023

Reproduction

https://formkit.link/f08612efb8ea548b38031f6736328fe3

Describe the bug

hello, I'm on Nuxt and keep getting a hydration mismatch error with this simple form:

<FormKit
type="form"
:actions=false
>
    <FormKit
    type="radio"
    name="sort"
    :options="['Newest', 'Price: Low To High', 'Price: High to Low']"
    :value="'Newest'"
    />
    <FormKit
    type="checkbox"
    name="region"
    :options="['Africa', 'Antartica', 'Asia', 'Australia', 'Caribbean', 'Europe', 
        'Middle East', 'North America', 'Pacific Islands', 'South America']"
    />
</FormKit>

its complaining that a span somehow turned into a div for the class 'formkit-inner'

[Vue warn]: Hydration node mismatch:
- Client vnode: div 
- Server rendered DOM: <span class=​"formkit-inner">​…​</span>​  
  at <FormKitSchema schema= {if: '$slots.outer', then: '$slots.outer', else: {…}} data= {_value: RefImpl, attrs: {…}, disabled: undefined, describedBy: ComputedRefImpl, fns: {…}, …} library= {FormKit: {…}}  ... > 
  at <FormKit type="checkbox" name="region" options= (10) ['Africa', 'Antartica', 'Asia', 'Australia', 'Caribbean', 'Europe', 'Middle East', 'North America', 'Pacific Islands', 'South America'] > 
  at <FormKitSchema schema= 

If I remove the radio input and leave the checkboxes -when the checkboxes are supposedly the problem- the warning goes away

*NOTE: i pasted the code in the formkit playground link, but the issue doesn't show up since this issue occurs when using nuxt

Environment

• OS: macOS
• Browser: Chrome
• Using Nuxt

@joshua1dg joshua1dg added ⛑ Needs triage The issue has not yet been examined by the FormKit team. 🐛 bug-report Bug is reported, but not verified by team labels Oct 11, 2023
@sashamilenkovic sashamilenkovic added 🐛 bug Verified bug by team 🚀 release-ready Feature or fix is complete and on an upcoming release branch 🟡 priority-2 2. Medium priority issue and removed 🐛 bug-report Bug is reported, but not verified by team ⛑ Needs triage The issue has not yet been examined by the FormKit team. labels Oct 11, 2023
@sashamilenkovic sashamilenkovic self-assigned this Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Verified bug by team 🟡 priority-2 2. Medium priority issue 🚀 release-ready Feature or fix is complete and on an upcoming release branch
Projects
None yet
Development

No branches or pull requests

3 participants