Skip to content

Commit

Permalink
Improve warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
KenanYusuf committed Oct 29, 2024
1 parent 4a6cf18 commit 130b949
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ export function useGridListView(

React.useEffect(() => {
if (props.unstable_listView && !props.unstable_listColumn) {
warnOnce(
warnOnce([
'MUI X: The `unstable_listColumn` prop must be set if `unstable_listView` is enabled.',
);
'To fix, pass a column definition to the `unstable_listColumn` prop, e.g. `{ field: "example", renderCell: (params) => <div>{params.row.id}</div> }`.',
'For more details, see https://mui.com/x/react-data-grid/list-view/',
]);
}
}, [props.unstable_listView, props.unstable_listColumn]);
}
Expand Down

0 comments on commit 130b949

Please sign in to comment.