Comments (9)
Awesome thanks so much @michelengelen
from mui-x.
You have created a support request under the "Priority Support" terms, which is a paid add-on to MUI X Premium ⏰. Please validate your support key using the link below:
https://tools-public.mui.com/prod/pages/jyhs86t?repo=mui-x&issueId=13628
Do not share your support key in this issue!
Priority Support is only provided to verified customers. Once you have verified your support key, we will remove the support: unknown
label and add the support: priority
label to this issue. Only then the time for the SLA will start counting.
from mui-x.
Hey @louisaaron ... this should only happen in row edit mode.
We did adjust this in #12216 for cell editing, but missed this for row editing.
Here is a diff that gets a potential fix started:
diff --git a/packages/x-data-grid/src/hooks/features/editing/useGridRowEditing.ts b/packages/x-data-grid/src/hooks/features/editing/useGridRowEditing.ts
index 33932d806..41c33fceb 100644
--- a/packages/x-data-grid/src/hooks/features/editing/useGridRowEditing.ts
+++ b/packages/x-data-grid/src/hooks/features/editing/useGridRowEditing.ts
@@ -442,7 +442,28 @@ export const useGridRowEditing = (
let newValue = apiRef.current.getCellValue(id, field);
if (fieldToFocus === field && (deleteValue || initialValue)) {
- newValue = deleteValue ? '' : initialValue;
+ if (deleteValue) {
+ const fieldType = apiRef.current.getColumn(field).type;
+ switch (fieldType) {
+ case 'boolean':
+ newValue = false;
+ break;
+ case 'date':
+ case 'dateTime':
+ case 'number':
+ newValue = undefined;
+ break;
+ case 'singleSelect':
+ newValue = null;
+ break;
+ case 'string':
+ default:
+ newValue = '';
+ break;
+ }
+ } else if (initialValue) {
+ newValue = initialValue;
+ }
}
acc[field] = {
I'll open this up as a good first issue. 👍🏼
from mui-x.
assign me
from mui-x.
Hey @kmr-ankitt sry for the late reply. I have been on PTO.
I just assigned it to you! Looking forward to the PR! 💪🏼
from mui-x.
Hey guys! Any progress here? Thanks
from mui-x.
Nothing yet @louisaaron ... I'll open a PR myself to fix this!
from mui-x.
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.
Note
We value your feedback @louisaaron! How was your experience with our support team?
If you could spare a moment, we'd love to hear your thoughts in this brief Support Satisfaction survey. Your insights help us improve!
from mui-x.
Thanks @michelengelen !
from mui-x.
Related Issues (20)
- Datepiker: Overlayed open picker icon with standard variant of textfield HOT 1
- DateRangePicker's `onAccept` callback is not called for same dates HOT 3
- [pickers] Improve the DX of custom pickers
- [Date Picker] DatePicker improperly adds extra 0's on Single-Digit Months and Days; It Should Strictly Respect Given Date Format HOT 5
- [question] Use unstable_dataSource with an async backend HOT 1
- [question] In premium data grid aggregation feature but was not able to edit it or able to access those values programatically to perform operations!
- [question] How to format a cell value during CSV export to be in a different format than it's displayed in the grid?
- [bug] DataGrid row auto height scroll glitch HOT 1
- StaticDatePicker shows duplicate dates for daylight savings and shifts the entire calendar by a day for the month
- [data grid] Provide ready to use data sources
- [question] rowCount with paginationMode=client and infinite loading with onRowsScrollEnd
- DateRangePicker value is truncated on MAC HOT 5
- [DatePicker] Design review - Label flickering when clicking on open picker button
- [TimePicker] Design review - Refine onClose and onAccept behavior
- [TimePicker] Design review - Unstable element position in picker
- [TimePicker] Design review - Left and right arrow key handling is missing
- [TimePicker] Design review - Contrast of focus visible is too low
- [DataGrid] - using renderHeader disables Data Grid's header cell description HOT 2
- Mui-data-grid-premium : Can't click away from dropdown(singleSelect) when single edit click
- DatePicker does not respect now required MUI 6 slotProps within its own slotProps HOT 2
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.