Open Cnordbo opened 1 year ago
@cherniavskii not sure why this is not working. Could you please help here?
The baseTextField
slot is not being used in the default component used to render edit cell. Instead, InputBase
is directly used.
https://github.com/mui/mui-x/blob/a71da3e7f191304444e855b8a228b0a843b1b45f/packages/grid/x-data-grid/src/components/cell/GridEditInputCell.tsx#L27
Could you use GridColDef.renderEditCell
to override the default edit component instead?
https://github.com/mui/mui-x/blob/a71da3e7f191304444e855b8a228b0a843b1b45f/packages/grid/x-data-grid/src/models/colDef/gridColDef.ts#L186-L191
Could you use
GridColDef.renderEditCell
to override the default edit component instead?
We can. Slots would just be a lot easier.
We can do that until a fix is ready, as i would still assume that this is a bug.
We shouldn't use baseTextField
for GridEditInputCell
though.
How about we add the editCellInput
slot for it?
We shouldn't use
baseTextField
forGridEditInputCell
though. How about we add theeditCellInput
slot for it?
Is baseCheckbox used for checkboxSelection? baseSelect used for filter dropdowns, baseTextField used for search etc?
If thats the case, then yes, a new convention should be introduced for edit cells.
And one could then be confused if your using both baseCheckbox
and editCellCheckbox
slots.
Should editCellCheckbox
respect baseCheckbox*
if no editCellCheckbox
is defined?
Seems like slots
is not what i need to focus on atm. and rather override renderEditCell based on type.
Steps to reproduce
Link to live example: (required) https://codesandbox.io/p/sandbox/gallant-shockley-4sv8pp?file=%2Fsrc%2FDemo.tsx%3A55%2C1-56%2C1
Based on your "Validation" example
Steps:
Expected result:
Actual:
Current behavior
Default component is still used
Expected behavior
CustomInputComponent to be used as text input
Context
Trying to use custom form input that matches our styleguide
Your environment
mui/x-data-grid-* v6.18.1
Browser: EdgeSearch keywords: datagrid baseTextField slot is not rendering slot component Order ID: 78924