Comments (7)
@scamden I've added it for today's grooming session so we can discuss and see how to proceed.
from mui-x.
@JohannesByle the problem is not with the property itself but rather the way you control it. In order to change column configuration once the grid is initially loaded you need to use apiRef.current.updateColumns
method. This is explained in the docs here https://mui.com/x/react-data-grid/column-definition/ (right below the first example).
from mui-x.
Thanks for the quick response. I had read that section of the docs, but because the two different columns behaved differently I assumed it was a bug.
In my case I have props that control whether or not a column is editable. Would the correct approach be to update the columns in a useEffect like this?
const {editable} = props;
useEffect(() => {
const cols = baseCols.map((c)=> ({...c, editable}));
apiRef.current.updateColumns(cols);
}, [editable]);
from mui-x.
After doing further testing it looks like it's broken for the apiRef.current.updateColumns
as well:
https://codesandbox.io/s/interesting-wiles-mr5vx5?file=/src/demo.tsx
from mui-x.
Ah ok, I can confirm, It doesn't seem to be working.
from mui-x.
this is a fairly huge bug.. any update on progress?
from mui-x.
This is a regression from #9334
v6.9.2: https://codesandbox.io/s/shy-wildflower-xqzpqp
v6.10.2: https://codesandbox.io/s/angry-david-ncrxph
The relevant change is here: https://github.com/mui/mui-x/pull/9334/files#diff-d6677e3149e60f2ede0c6ad76a8014630705d0668b5d8c92284a8e643d75a145
from mui-x.
Related Issues (20)
- [DataGrid] ColumnHeader sorting icon has old Tooltip HOT 4
- [DataGrid] `getActions` logs a warning when it returns a DOM element
- [DataGrid] Autosizing does not work correctly HOT 7
- [DataGrid] Issue with Row Grouping, Aggregation, and GridToolbar in DataGrid Premium HOT 2
- Module not found: Error: Can't resolve '@mui/x-date-pickers/DatePicker' HOT 2
- [pickers] DateCalendar doc page Discoverability HOT 1
- [DataGrid] An empty line above pinnedRows in the latest version HOT 3
- [data grid] Support onFilterMenuClose HOT 4
- [data grid] onMenuClose called too often HOT 1
- [docs] Missing Dependencies in "Charts - Getting Started" HOT 3
- [DataGrid] How to set sortModel to a Group on mount HOT 3
- [DataGrid] Export `GridColumnUnsortedIconProps` interface for custom slots HOT 2
- [DataGrid] Performance: Improve scrolling & virtualization logic HOT 4
- [DataGrid] Use of `isCellEditable` causes entire row to toggle its editability, rather than single cell HOT 6
- [DatePicker] Opening a DatePicker throws an error and month change icon doesn't work HOT 5
- [DataGrid] Can a custom filtering implementation make use of MUI's filter state? HOT 8
- [pickers] The DatePicker 'onAccept' event fires both when clicking on the Ok button and also when clicking outside the Picker (or pressing ESC), if the date has changed HOT 2
- Line chart legend overlap with the rest of the chart HOT 3
- [charts] Line chart highlight mark customisation HOT 4
- [charts] How to display given time as local time in a LineChart HOT 9
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.