Comments (10)
We just got fresh insight from the problem and actually managed to fix the problem. When checking the problem, we had multiple nested overflowing items (causing multiple nested scrollbars). We anticipated the triple scrollbars were the cause of the problem, and fixed them. As a result, the problem no longer appears.
If you are interested, I can try to fish for more information. I believe it is still related to MUI, but not specifically to DataGrid.
from mui-x.
Hey @laurisvan ... thanks for raising this. It is indeed a bit strange to see that error.
From your description it is not an easy task to determine where to initially look for tbh.
I will loop in our team here to see if we can find a solution for you soon.
@MBilalShafi or @romgrk Could you maybe have a hint or encountered this before?
from mui-x.
No, we don't have enough information here. We'd need to at least be able to see the code to better assess what's causing it. It would also be nice to have the full stack traces, that could also tell us what's causing it.
from mui-x.
The innermost wrapper before DataGrid is as follows. The whole component structure is quite deep, so I am not sure how much more I can give without making the set of examples exhaustive:
import { GridColDef } from '@mui/x-data-grid-premium'
import { translate } from '$lib/locale'
import { formatDate } from '$lib/util/timeFormattingUtils'
import { DataGrid } from '$widgets/utils/DataGrid/DataGrid'
type RelationsListGridProps = {
relationsList: { id: string; name: string; startsAt?: string; endsAt?: string | null }[]
onCellClick: (relation: any) => void
}
export default function RelationsListGrid(props: RelationsListGridProps): React.ReactElement {
const columns: GridColDef[] = [
{
field: 'name',
headerName: translate('generic.name'),
flex: 1,
valueGetter: (params) => params.row.name
},
{
field: 'parentName',
headerName: translate('profile-details.dimension'),
flex: 1,
valueGetter: (params) => params.row.parentName
},
{
field: 'startsAt',
headerName: translate('generic.startsAt'),
width: 150,
valueGetter: (params) => formatDate(params.row.startsAt as string, { displayYear: true })
},
{
field: 'endsAt',
headerName: translate('generic.endsAt'),
width: 150,
valueGetter: (params) => formatDate(params.row.endsAt, { displayYear: true, renderAsExclusiveEndDate: true })
},
{
field: 'selfEditable',
headerName: translate('generic.selfEditable'),
width: 150,
valueGetter: (params) => (params.row.selfEditable ? translate('boolean.true') : '')
}
]
return (
<DataGrid
disableMultipleRowSelection
checkboxSelection={false}
onCellClick={props.onCellClick}
columns={columns}
rows={props.relationsList}
initialState={undefined}
/>
)
}
The whole widget tree is exhaustive, but I'll try to provide some bits from above and below the graph, just in case the structure gave any hints.
from mui-x.
I don't see anything unusual. Next step would be to get a full stack trace, including line numbers, so we can pinpoint where it's going wrong. The interesting data isn't just the last entry, it's the entries leading to the stack overflow.
from mui-x.
Unfortunately I am not able to extract full stack trace, as TrackJS only provides a few traces. As soon as I am able to repeat the problem myself, I could give full information.
I am not sure if it gives any more insight, but all the reported browsers are Windows 10 Chromes, with either version 120.0 or 119.0. One of the users confirmed this does not repeat on Edge browser on the same Windows machine.
Here's what I am able to give:
obj ../../../node_modules/@mui/x-data-grid/hooks/core/useGridApiInitialization.js 23:10
Showing original source content from sourcemap
if (visibility === 'public') {
publicApi[methodName] = methods[methodName];
} else {
privateOnlyApi[methodName] = methods[methodName];
}
});
};
const handler = {
get: (obj, prop) => {
if (prop in obj) {
return obj[prop];
}
return privateOnlyApi[prop];
},
set: (obj, prop, value) => {
obj[prop] = value;
{anonymous} ../../../node_modules/@mui/x-data-grid/hooks/core/useGridStateInitialization.js 28:68
Showing original source content from sourcemap
return false;
}
let ignoreSetState = false;
// Apply the control state constraints
const updatedControlStateIds = [];
Object.keys(controlStateMapRef.current).forEach(stateId => {
const controlState = controlStateMapRef.current[stateId];
const oldSubState = controlState.stateSelector(apiRef.current.state, apiRef.current.instanceId);
const newSubState = controlState.stateSelector(newState, apiRef.current.instanceId);
if (newSubState === oldSubState) {
return;
}
updatedControlStateIds.push({
stateId: controlState.stateId,
hasPropChanged: newSubState !== controlState.propModel
{anonymous} ../../../node_modules/@mui/x-data-grid/hooks/core/useGridStateInitialization.js 26:44
Showing original source content from sourcemap
}
if (apiRef.current.state === newState) {
return false;
}
let ignoreSetState = false;
// Apply the control state constraints
const updatedControlStateIds = [];
Object.keys(controlStateMapRef.current).forEach(stateId => {
const controlState = controlStateMapRef.current[stateId];
const oldSubState = controlState.stateSelector(apiRef.current.state, apiRef.current.instanceId);
const newSubState = controlState.stateSelector(newState, apiRef.current.instanceId);
if (newSubState === oldSubState) {
return;
}
updatedControlStateIds.push({
fn ../../../node_modules/@mui/x-data-grid/hooks/utils/useGridApiMethod.js 14:19
Showing original source content from sourcemap
if (!privateApiRef.current) {
return;
}
apiMethodsNames.forEach(methodName => {
if (!privateApiRef.current.hasOwnProperty(methodName)) {
privateApiRef.current.register(visibility, {
[methodName]: (...args) => {
const fn = apiMethodsRef.current[methodName];
return fn(...args);
}
});
}
});
}, [apiMethodsNames, privateApiRef, visibility]);
React.useEffect(() => {
apiMethodsRef.current = apiMethods;
{anonymous} ../../../node_modules/@mui/x-data-grid/hooks/features/columns/useGridColumns.js 48:19
Showing original source content from sourcemap
stateId: 'visibleColumns',
propModel: props.columnVisibilityModel,
propOnChange: props.onColumnVisibilityModelChange,
stateSelector: gridColumnVisibilityModelSelector,
changeEvent: 'columnVisibilityModelChange'
});
const setGridColumnsState = React.useCallback(columnsState => {
logger.debug('Updating columns state.');
apiRef.current.setState(mergeColumnsState(columnsState));
apiRef.current.forceUpdate();
apiRef.current.publishEvent('columnsChange', columnsState.orderedFields);
}, [logger, apiRef]);
/**
* API METHODS
*/
setGridColumnsState ../../../node_modules/@mui/x-data-grid/hooks/features/columns/useGridColumns.js 249:6
Showing original source content from sourcemap
/**
* EVENTS
*/
const prevInnerWidth = React.useRef(null);
const handleGridSizeChange = viewportInnerSize => {
if (prevInnerWidth.current !== viewportInnerSize.width) {
prevInnerWidth.current = viewportInnerSize.width;
setGridColumnsState(hydrateColumnsWidth(gridColumnsStateSelector(apiRef.current.state), viewportInnerSize.width));
}
};
useGridApiEventHandler(apiRef, 'viewportInnerSizeChange', handleGridSizeChange);
/**
* APPLIERS
*/
SNe.p ../../../node_modules/@mui/x-data-grid/hooks/utils/useGridApiEventHandler.js 33:92
Showing original source content from sourcemap
const subscription = React.useRef(null);
const handlerRef = React.useRef();
handlerRef.current = handler;
const cleanupTokenRef = React.useRef(null);
if (!subscription.current && handlerRef.current) {
const enhancedHandler = (params, event, details) => {
if (!event.defaultMuiPrevented) {
var _handlerRef$current;
(_handlerRef$current = handlerRef.current) == null ? void 0 : _handlerRef$current.call(handlerRef, params, event, details);
}
};
subscription.current = apiRef.current.subscribeEvent(eventName, enhancedHandler, options);
cleanupTokensCounter += 1;
cleanupTokenRef.current = {
cleanupToken: cleanupTokensCounter
};
SNe.emit ../../../node_modules/@mui/x-data-grid/utils/EventManager.js 57:17
Showing original source content from sourcemap
const listener = highPriorityListeners[i];
if (collection.highPriority.has(listener)) {
listener.apply(this, args);
}
}
for (let i = 0; i < regularListeners.length; i += 1) {
const listener = regularListeners[i];
if (collection.regular.has(listener)) {
listener.apply(this, args);
}
}
}
once(eventName, listener) {
// eslint-disable-next-line consistent-this
const that = this;
this.on(eventName, function oneTimeListener(...args) {
{anonymous} ../../../node_modules/@mui/x-data-grid/hooks/core/useGridApiInitialization.js 67:39
Showing original source content from sourcemap
const [name, params, event = {}] = args;
event.defaultMuiPrevented = false;
if (isSyntheticEvent(event) && event.isPropagationStopped()) {
return;
}
const details = props.signature === GridSignature.DataGridPro ? {
api: privateApiRef.current.getPublicApi()
} : {};
privateApiRef.current.eventManager.emit(name, params, event, details);
}, [privateApiRef, props.signature]);
const subscribeEvent = React.useCallback((event, handler, options) => {
privateApiRef.current.eventManager.on(event, handler, options);
const api = privateApiRef.current;
return () => {
api.eventManager.removeListener(event, handler);
};
from mui-x.
@mui/xgrid do we have someone with a similar setup (windows 10, chrome v119 or v120 and edge) to test this?
from mui-x.
I could boot in windows 11 to try it.
@laurisvan I just noticed that you're on an older version of the grid, could you try the latest 6.x version?
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.
If you find more detailed information you can post here or in the main MUI repository if applicable, but it's also fine to close it and wait until someone has a clear & reproducible case.
from mui-x.
Related Issues (20)
- [charts] Support `themeAugmentation`
- [data grid] Remove the unused legacy editing API event `rowEditCommit` HOT 1
- [pickers] Allow to refuse ranges that contains at least one disabled date HOT 5
- Move focus up after an edit when shift enter is pressed
- [pickers] Enhancing User Experience: Introducing Month and Year Selection in Date-Pickers HOT 5
- [TreeView][ESM] package exports are incorrect HOT 4
- Make Loading overlay states change based on data HOT 6
- [pickers] Ensuring Comprehensive Validation for Date and DateTime Range Fields HOT 2
- [charts] Axis min/max does not allow dynamic rescaling of the other Axis when that axis has no min/max set HOT 6
- [pickers] Ineffective Date and Time Validation Despite minTime, maxTime, and disableIgnoringDatePartForTimeValidation Settings HOT 2
- [data grid] Dynamic Aggregation Position HOT 7
- [How to get column widths exact on resize within detail panel based on Data Grid columns] HOT 2
- [data grid] Is it possible to have tree data row children open and under that details panel? HOT 9
- [data grid] Same column in different column groups HOT 8
- ThemeProvider not provide Translation keys. HOT 2
- [Data Grid Premium - Cell Copy and paste] Copied content from cell doesnt mantain the sorting set in the data premium grid HOT 3
- [data grid] Copy and Paste content from cell selection doesn't maintain the sorting set HOT 3
- [charts] labels are incorrect in RTL HOT 3
- [data grid] New DataGrid header style not properly passed to header HOT 4
- [data grid] Pressing `Delete` key in a Boolean type cell, the value incorrectly resets to empty string HOT 6
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.