Open dizzyjaguar opened 1 year ago
We definitely need to improve this page. The slot you used is not documented because it makes part of the slots used to inject the basic MUI components, e.g. Checkbox
, TextField
, Select
.
The slot you used is not documented because it makes part of the slots used to inject the basic MUI components, e.g. Checkbox, TextField, Select.
@m4theushw I'm not sure I understand, can you re-iterate.
The slots beginning with "base" in the file below are the building blocks of the grid. For instance, BaseCheckbox
is used to replace the checkbox component used in all places that require a checkbox-like component (e.g. boolean column and row selection). Currently, these slots are set internally to contain components from MUI that implement the Material Design spec, however, in the future they will allow to use another set of base components, like those from Joy UI.
Gotcha, thanks for the clarification I appreciate it!
Duplicates
Related page
https://mui.com/x/react-data-grid/components/
Kind of issue
Missing information
Issue description
I was looking for an easy explanation on how to provide a
slot/component
customization with the defaultstate
andprops
that theDatagrid
is already providing to its components. I didn't find this clearly explained with the customization docs. Which then led me to dig into the code to see how certain components were implemented.In my case it was just simply replacing the
switches
that are on thecolumnShowHidePanel
withcheckboxes
. I later realized that if I just provided the component I wanted to use withprops
and spread them, it gave me the easy outcome I was looking for.My Checkbox component, accepting and spreading the
props
from the default component. As well adding it to the componentslot
.Anyways, I think this could be extremely helpful to explain in a simple manner somewhere in the documentation.
Context 🔦
Easier customization of component
slots
on theDatagrid
with default props and state. In my case I was just looking to replaceswitches
withcheckboxes
.