Comments (3)
Hi, @Arshad737 scroll in both axis at the same time is not supported. You can create a list where each row will be ViewportList but I can't recommend you this way. Also you can't use sticky elements - one of the possible ways to use sticky is grouping like:
<Scrollable>
<Sticky />
<ViewportList />
<Sticky/>
<ViewportList />
</Scrollable>
If your case is a big data table I think it's better to use other library like react-window. It also will be more performant in this case.
from react-viewport-list.
I have a grid with sticky rows and columns,
I have been using react-window for virtualization, but it doesn't work for the grids which have sticky columns because of position absolute.
I can work with y-scroll, but need columns to be virtualised
from react-viewport-list.
Do you use native css position: sticky;
? I don't know a virtualization library to support this. You should use js approach and react-virtualize and virtuoso support it.
If your columns have a fixed width and sticky rows are fixed too (I mean only some specific rows are sticky (maybe the first row) you can try to use solution described by me above:
Render vertical list before sticky row, render sticky row, render vertical list before next sticky row...
Each row is a horizontal list.
Not pretty solution, but this is what you can do to support css sticky.
@Arshad737 I created a simple demo with fixed cells (fixed width and fixed height)
from react-viewport-list.
Related Issues (20)
- Thank you HOT 3
- New items added to bottom of list. After refresh, appeared first. HOT 6
- Incorrect page scrolling behavior when `initialIndex` or `scrollToIndex` is used HOT 4
- Why does it work when height varies? HOT 2
- List items rendered with undefined HOT 2
- Endless Scrolling Loop HOT 28
- scroll to bottom while having async rendering items HOT 2
- Scroll to bottom on initial render HOT 2
- flew wrap not work HOT 1
- Is infinite scroll pagination supported? HOT 1
- Scroll to position HOT 3
- remove spacer in list HOT 3
- Question regarding CPU usage when idle HOT 7
- Is SSR supported? HOT 8
- Any way to show a dynamic number of columns? HOT 2
- Unexpected scroll jump with initialIndex set to last item HOT 8
- Having trouble getting axis="x" to work HOT 3
- justify-content: flex-end; hides the scroll bar. HOT 2
- Styling is breaking if used in material ui table HOT 2
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-viewport-list.