Skip to content
Source
Sign inSign up
TanStack/virtual

Adding keepAliveOnHidden option to keep items mounted in case of a tab switch, e.g., in ion-tabs. #1104

Openj4hangir(GitHub profile, opens in a new tab)wants to merge 4 commits intomain fromrefs/pull/1104/headopened

🎯 Changes

Added keepAliveOnHidden option. In my app, using ion-tabs, switching between tabs was causing unwanted unmounts/remounts for the items, whereas they're supposed to stay mounted. The diff is minimal. I haven't tested thoroughly but there can possibly be any side effects, as we have only one extra condition which depends on the given keepAliveOnHidden option.

✅ Checklist

  • [NOT] I have followed the steps in the Contributing guide.
  • [X ] I have tested this code locally with pnpm run test:pr.

🚀 Release Impact

  • [ NOT] This change affects published code, and I have generated a changeset.
  • [ NOT] This change is docs/CI/dev-only (no release).
    1. changeset-bot[bot](GitHub profile, opens in a new tab)commented

      ⚠️ No Changeset found

      Latest commit: 83ad2f6d19cc730d3fc16c967c543607b9b4200e

      Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

      This PR includes no changesets

      When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

      Click here to learn what changesets are, and how to add one.

      Click here if you're a maintainer who wants to add a changeset to this PR

Sign in to join this conversation.