Skip to content

Header flashes when new Tabs are created #133

@dan-fein

Description

@dan-fein

Current behavior

I'm conditionally rendering new Tabs and when some are created after API calls return they're causing the entire component to flash.

Expected behaviour

New Tabs should be created without a re-render of the entire component, the component should in-place just re-render only the parts that are necessary rather than the entire component (e.g. the Header shouldn't be re-rendered if the only things changing are below it where the tab bar is).

Code sample

For Syntax Highlighting check this link

The relevant code is just:

{posts && <Tabs.Tab name="Items">
    <Posts posts={posts} render={'items'} currentThing={thing} {...props} key="items" tabView={Tabs} />
</Tabs.Tab> : <Tabs.Tab />}    

What have you tried

Narrowed down the issue to the new tabs being created conditionally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions