Skip to content

[Bug]: TabsContent hard-codes force-mount with presence #2476

@dfidler

Description

@dfidler

Environment

Reka UI version: 2.8.2
Vue version: 3.5.28
CSS framework: tailwindcss@3.4.19

Link to minimal reproduction

https://github.com/dfidler/reka-ui-issue-2476

Steps to reproduce

Use TabsCount (without setting forceMount) with multiple tabs and then switch between them in an SPA; inspect the DOM, they're all there.

Describe the bug

TabsContent hardcodes force-mount when calling presence.

Introduced in commit 9526356 - looks like it was intended to hydrate tab content for SSR, but it's breaking change for SPA.

Expected behavior

Detect if we're in SSR or SPA mode and honour force-mount prop on TabsContent.

Code should read :force-mount="!isBrowser || forceMount"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions