Skip to content

Components Rendering Issue #495

Description

@makbar-hgsd

I am rendering multiple components in different react-tabs but whenever I switch between those tabs my components gets re-render. Is there anyway to stop this re-rendering on switching tabs?

Activity

  1. geekynasir commented on Oct 20, 2022

    @geekynasir

    Hi I am facing the same issue were you able to solve this if yes plz can you tell me how did you solved it thanks

  2. tekisx commented on Nov 22, 2022

    @tekisx

    Try adding forceRenderTabPanel={true} to your <Tabs> component. That fixed a similar issue for me

  3. willnaoosmith commented on Dec 6, 2022

    @willnaoosmith

    forceRenderTabPanel={true} renders all tabs at the same time,. So it solves the rendering issue, but creates another, making the tabs useless.

  4. avfirsov commented on Dec 10, 2024

    @avfirsov

    forceRenderTabPanel={true} renders all tabs at the same time,. So it solves the rendering issue, but creates another, making the tabs useless.

    The same

  5. joepvl commented on Jan 7, 2025

    @joepvl
    Collaborator

    The point of the forceRenderTabPanel feature is to enable you to determine when to display which panel. Note that you can also set forceRender on a per tab basis. Then it's up to you to hide and show the tab at the appropriate time, usually by applying styling rules (either directly or by e.g. toggling a CSS class) from within in the onSelect callback.
    Also note that even forceRendered panels will receive the selectedTabPanelClassName.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions