Skip to content

Mui_Datagrid - How to Customize Mui Datagrid? #29

Answered by SWS-5007
HappyCodingLover asked this question in Q&A
Discussion options

You must be logged in to vote

Hello,
You can add this sx style for datagrid.

              sx={{
                [`& .${gridClasses.cell}:focus, & .${gridClasses.cell}:focus-within`]:
                  {
                    outline: "none",
                  },
                [`& .${gridClasses.columnHeader}:focus, & .${gridClasses.columnHeader}:focus-within`]:
                  {
                    outline: "none",
                  },
              }}

For example.

            <DataGrid
              rows={rows}
              columns={columns}
              initialState={{
                pagination: {
                  paginationModel: { page: 0, pageSize: 5 },
                },
              }}
              pa…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@SWS-5007
Comment options

Answer selected by HappyCodingLover
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers question Further information is requested
2 participants