mui / mui-x

MUI X: Build complex and data-rich applications using a growing list of advanced React components, like the Data Grid, Date and Time Pickers, Charts, and more!
https://mui.com/x/
4.14k stars 1.29k forks source link

On disableColumnResize the SVG icon is still visible #9570

Closed aashay28 closed 1 year ago

aashay28 commented 1 year ago

Duplicates

Latest version

Steps to reproduce 🕹

Screenshot 2023-07-05 at 12 18 54 PM

While using disableColumnResize the SVG icon must hide.

<DataGridPro
rows={UsersData}
columns={columns}
checkboxSelection
disableColumnResize
/>

Right now user feels like, the columns are resizable.

Current behavior 😯

On disableColumnResize the SVG icon is still visible

Expected behavior 🤔

On disableColumnResize the SVG icon get hidden

Context 🔦

No response

Your environment 🌎

No response

Order ID or Support key 💳 (optional)

No response

MBilalShafi commented 1 year ago

We show header separator in disabled state on hover to let user be aware of the boundaries of a column, you can hide this by targeting gridClasses.columnSeparator.

<DataGridPremium
  rows={rows}
  columns={columns}
  disableColumnResize
  sx={{
    [`.${gridClasses.columnSeparator} svg`]: {
      visibility: "hidden"
    }
  }}
/>

Does this serve your need?

aashay28 commented 1 year ago

@MBilalShafi Yes absolutely correct, but i think the column separator must be hidden when the disableColumnResize option is used.

MBilalShafi commented 1 year ago

Thanks for the recommendation, we are already exploring this topic at https://github.com/mui/mui-x/issues/7268 and you are most welcome to check it out and share your opinion there. Regarding the current ticket, since you have a workaround for your problem, I'll close this.