Comments (14)
Column virtualization already exists by default. Can you share a minimal reproduction test case with the latest version. This would help a lot 👷.
A live example would be perfect. This codesandbox.io template may be a good starting point. Thank you!
from mui-x.
https://codesandbox.io/s/wizardly-solomon-c9nnyx?file=/demo.tsx
Here is a reproduction of the issue
from mui-x.
You can use useGridApiEventHandler(apiRef, 'scrollPositionChange', (params, event) => { ... })
to react to scroll events, and you can use apiRef.current.virtualScrollerRef.current
to access the grid DOM node with scrollbars. Don't try to wrap the grid with custom scrollbars.
https://mui.com/x/react-data-grid/events/#with-usegridapieventhandler
from mui-x.
Is this the only way?
how can we optimize it so it wont show lag when scrolling and it would feel more seamless?
Thanks
from mui-x.
You can add a vanilla javascript handler attached to the apiRef.current.virtualScrollerRef
element that listens to scroll events, and reflects it to the other grid. You will need to ensure that programatically scrolling one doesn't trigger the other one's scroll event, to avoid the scroll behaving weirdly (if it gets semi-locked, not scrolling for more than a few pixels, it means you're hitting this case).
Be sure to free the resources and detach the event listeners when your components are unmounted.
from mui-x.
Thank you very much!
will give it a try
from mui-x.
Im having a problem when forwarding the ref to the datagridpremium -
could you please write a small example on how to sync-
const apiRefData = useGridApiRef() with a forwardRef?
Thank you!
from mui-x.
Im having a problem when forwarding the ref to the datagridpremium -
could you please write a small example on how to sync-
const apiRefData = useGridApiRef() with a forwardRef?
Thank you!
from mui-x.
Please provide a minimal reproduction test case with the latest version. This would help a lot 👷.
A live example would be perfect. This codesandbox.io template may be a good starting point. Thank you!
from mui-x.
https://codesandbox.io/s/loving-vaughan-wg84tf?file=/demo.tsx
basically when scrolling the position left is always on 0 and not propagating.
from mui-x.
The link you shared does not run. Please provide a minimally working link.
from mui-x.
https://codesandbox.io/s/lucid-pateu-tm6n6z?file=/demo.tsx
sorry!
from what I can see on my end- on the top element that forwards the ref
the current.scrollLeft is always 0 and cant be set. maybe Im not accessing it correctly?
from mui-x.
The horizontal scroll sync is working in that link for me. Could you clarify what is not working for you? Make sure to include good reproduction steps.
from mui-x.
The issue has been inactive for 7 days and has been automatically closed. If you think that it has been incorrectly closed, please reopen it and provide missing information (if any) or continue the last discussion.
from mui-x.
Related Issues (20)
- [docs] Customization playground - simplify customization token options
- [support] Improve priority support HOT 1
- [data grid] `onFilterModelChange` fires with stale field value HOT 4
- [pickers] Date/Time/Date-Time Picker: Clear date with clear icon in Datepicker Textfield HOT 6
- [data grid] `singleSelect` with empty value option moved to the last HOT 2
- [datagrid] Make quickfilter search by date HOT 8
- [Charts] If a chart is in a drawer, it's tooltip is not visible (it is below the drawer) HOT 1
- [Data Grid] Hide tooltip when row is not being displayed HOT 2
- datagrid pro infinite scroll with custom quick filter losing focus immediately after typing HOT 1
- Exporting Not working for master/detail HOT 15
- [charts] Allows to get clicks from pie slice HOT 1
- Automatically Save / Restore State HOT 20
- Columns are shrinked when drawer or dialog is opened HOT 5
- [datagrid] `autosizeColumns` does not work HOT 20
- [data grid] Filter panel form fail to update when `filterModel` changes HOT 6
- [pickers] TimePicker closing on selection when closeOnSelect is false HOT 4
- [playground] Wrong conversion between theme overrides vs sx prop HOT 1
- [question] Change "-" to "a" in the SingleInputDateRangeField component HOT 8
- [pickers] DatePicker can be cleared when disabled HOT 1
- [DataGridPro] Incorrectly inheriting height from CSSGrid / Flexbox child since 6.2.0 HOT 4
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 mui-x.