Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pinned columns error when disable column virtualization #16136

Open
ysf99842 opened this issue Jan 11, 2025 · 0 comments
Open

Pinned columns error when disable column virtualization #16136

ysf99842 opened this issue Jan 11, 2025 · 0 comments
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! status: waiting for maintainer These issues haven't been looked at yet by a maintainer

Comments

@ysf99842
Copy link

ysf99842 commented Jan 11, 2025

Steps to reproduce

Steps:

  1. [Open this link to live example: https://react-qoqnqeyo.stackblitz.io
  2. Here are the codes:

import Box from '@mui/material/Box';
import { DataGridPro } from '@mui/x-data-grid-pro';
import { useDemoData } from '@mui/x-data-grid-generator';
import React from 'react';

export default function DataGridProDemo() {
const { data, loading } = useDemoData({
dataSet: 'Commodity',
rowLength: 100,
editable: true,
});

const apiRef = React.useRef();

React.useEffect(() => {
if (apiRef.current) {
apiRef.current.unstable_setColumnVirtualization(false);
}
}, []);

return (
<Box sx={{ height: 520, width: '100%' }}>
<DataGridPro
{...data}
apiRef={apiRef}
columnBufferPx={100000}
pinnedColumns={{ left: ['commodity'] }}
/>

);
}

Current behavior

Frozen column display error, appeared twice. The setting for columnBufferPx is not in effect

Expected behavior

Normal display
屏幕截图 2025-01-11 170700

Context

First, the setting for columnBufferPx did not take effect, and I set it to large, which still did not prevent column virtualization.
Second, using unstable_setColumnVirtualization can cause problems with the display of frozen columns, and I want to know if there is something wrong with my usage. Please refer to the demonstration I gave. Thank you for your support!

Your environment

System:
OS: Windows 11 10.0.26100
Binaries:
Node: 20.16.0 - C:\Program Files\nodejs\node.EXE
npm: 10.9.0 - C:\Program Files\nodejs\npm.CMD
pnpm: Not Found
Browsers:
Chrome: Not Found
Edge: Chromium (131.0.2903.99)
npmPackages:
@emotion/react: ^11.14.0 => 11.14.0
@emotion/styled: ^11.14.0 => 11.14.0
@mui/base: 5.0.0-beta.66
@mui/core-downloads-tracker: 6.3.1
@mui/icons-material: ^6.2.1 => 6.3.1
@mui/lab: 6.0.0-beta.19
@mui/material: ^6.2.1 => 6.3.1
@mui/private-theming: 6.3.1
@mui/styled-engine: 6.3.1
@mui/system: 6.3.1
@mui/types: 7.2.21
@mui/utils: 6.3.1
@mui/x-data-grid: 7.23.6
@mui/x-data-grid-pro: ^7.23.6 => 7.23.6
@mui/x-internals: 7.23.6
@mui/x-license: 7.23.6
@toolpad/core: ^0.11.0 => 0.11.0
@toolpad/utils: 0.11.0
@types/react: ^18.3.12 => 18.3.18
react: ^18.3.1 => 18.3.1
react-dom: ^18.3.1 => 18.3.1
typescript: ~5.6.2 => 5.6.3

Search keywords: virtualization, pinned columns

@ysf99842 ysf99842 added bug 🐛 Something doesn't work status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jan 11, 2025
@github-actions github-actions bot added the component: data grid This is the name of the generic UI component, not the React module! label Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! status: waiting for maintainer These issues haven't been looked at yet by a maintainer
Projects
None yet
Development

No branches or pull requests

1 participant