-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[DataGrid] Extending built-in column types doesn't work #4113
Comments
columnTypes={{
date: {
extendType: "date"
}
}} But is it valid ? You make a type extend itself. |
I think it's useful and users seem to use it - see #3928 (comment) |
In that case, should we just support upsert instead of insert on the columnTypes={{
date: {
// ... extend the type default properties
}
}} And I would ignore the columnTypes={{
date: {
extendType: "boolean"
}
}} |
We can't change the way
In this case you automatically extend the existing type or create a column with zero attributes?
Note that the key of the new column doesn't matter internally, it's only a new column. One edge case with columnTypes={{
date: {
extendType: 'date'
},
otherDate: {
// should it extend the overridden 'date' or the built-in 'date'?
// I'm favor of extending the built-in because relaying on the order of the keys is not reliable
extendType: 'date'
},
}} |
I would extend the existing type Basically for each (key, value) of
But I also agree that the whole |
@flaviendelangle right, #4114 fixes it exactly how you described |
Duplicates
Latest version
Current behavior 😯
When extending default column type, all column definition properties are lost.
Expected behavior 🤔
Extending default column type should preserve all default properties
Steps to reproduce 🕹
Steps:
valueFormatter
) are not usedContext 🔦
Discovered in different issue - see #3928 (comment)
After rewriting flex implementation, this issue caused layout issues because
minWidth
/maxWidth
wereundefined
andclamp
util function returnsNaN
when one of it's arguments isundefined
Your environment 🌎
`npx @mui/envinfo`
Order ID 💳 (optional)
No response
The text was updated successfully, but these errors were encountered: