Comments (9)
That's a good point.
The reason why react-tabtab
is designed with re-mount mechanism is hoped to handle as many tabs as possible. If it keeps all the panel mounted result, it will cause performance issue.
But yes, I think that's a possible situation when creating tab UI. Maybe it's possible to add a cache
props on the tab, it means this panel won't be unmounted. (Of course, it means developers need to handle the performance issue by themselves.
The possible api:
<Tabs>
<TabList>
<Tab>Tab1</Tab>
<Tab cached>Tab2</Tab> // this tab wont be unmount
</TabList>
<PanelList>
<Panel>
Accusamus enim nisi itaque voluptas nesciunt repudiandae velit. <br/>
Ad molestiae magni quidem saepe et quia voluptatibus minima. <br/>
Omnis autem distinctio tempore. Qui omnis eum illum adipisci ab.
</Panel>
<Panel>
Officiis commodi facilis optio eum aliquam.<br/>
Tempore libero sit est architecto voluptate. Harum dolor modi deleniti animi qui similique facilis. Sit delectus voluptatem praesentium recusandae neque quo quod.
</Panel>
</PanelList>
</Tabs>
What do you think?
from react-tabtab.
Hi @dineshnamburi, I will try to add this feature in recent. Maybe next month.
If you have any idea of this feature, any help and PR is welcome.
from react-tabtab.
Yeah, I think it's a great solution when the effects of the performance issue are limited.
Some tabs with heavy
component and lots of middle states can be set with cache
prop, and other tabs can be set without the prop.
from react-tabtab.
About how to handle performance issues, I think it deserves detailed discussion.
Many small but useful usage tips can be brought out.
from react-tabtab.
Hi @ctxhou , is there any plan to add a feature like cached prop to this module, in near future???
from react-tabtab.
@ctxhou Any plan on implementing the feature? Thanks.
from react-tabtab.
Hi @qqdaiyu55
I am a little busy recently. Are you interested in implementing this issue?
from react-tabtab.
@ctxhou Sorry I'm also busy recently, I'll take a look if I have time. If you have any idea on implementing this feature, you can post it here : )
from react-tabtab.
Any update on it? or any possible solution or hack for now?
from react-tabtab.
Related Issues (20)
- Make your own style HOT 3
- Drag Tabs between multiple strips
- React router
- custom styled is not function HOT 2
- Feature request: Drop down as child of tab.
- Feature - add classname prop to various components HOT 1
- Closing a modal with no tabs in TabList results in an error
- Default tabs show buttons between them HOT 2
- Cannot use custom style as way of the documentation
- Drag Tabs with close button issue on windows HOT 2
- Object styled is not a function HOT 3
- rtl support HOT 1
- Close button style doesn't match example / no way to modify with props
- Button Issues
- Support Typescript - create declaration file HOT 3
- Tab broken on page reload in Next js 10
- Update to React 17? HOT 1
- RTL support
- Custom Modal Component and Content
- Cannot figure out a way to change the styles of the tab when dragging
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-tabtab.