Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Pinning functionality dose not work for columns in docs example #14850

Closed
masoud-keykha opened this issue Oct 6, 2024 · 2 comments · Fixed by #14854
Closed

[docs] Pinning functionality dose not work for columns in docs example #14850

masoud-keykha opened this issue Oct 6, 2024 · 2 comments · Fixed by #14854
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! support: docs-feedback Feedback from documentation page

Comments

@masoud-keykha
Copy link

masoud-keykha commented Oct 6, 2024

Steps to reproduce

Link to live example: https://mui.com/x/react-data-grid/master-detail/#disable-detail-panel-content-scroll

Steps:

  1. Click on any column menu
  2. Click on Pin to left or Pin to right
  3. Dose not work

Solution: Using pinnedColumns and onPinnedColumnsChange

Code:

const [pinnedColumns, setPinnedColumns] = useState({
  left: [GRID_DETAIL_PANEL_TOGGLE_FIELD],
});

const handlePinnedColumnsChange = useCallback((updatedPinnedColumns) => {
  setPinnedColumns(updatedPinnedColumns);
}, []);

<DataGridPremium
{ ...props }
        pinnedColumns={pinnedColumns}
        onPinnedColumnsChange={handlePinnedColumnsChange}
/>

Current behavior

With current behavior pinning dose not work because pinnedColumns prop of data grid is staticky GRID_DETAIL_PANEL_TOGGLE_FIELD

Expected behavior

Works correctly all features of data grid

Context

No response

Your environment

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Search keywords: pin, pin to left, pin to right

@masoud-keykha masoud-keykha added bug 🐛 Something doesn't work status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Oct 6, 2024
@github-actions github-actions bot added the component: data grid This is the name of the generic UI component, not the React module! label Oct 6, 2024
@kalyan90
Copy link
Contributor

kalyan90 commented Oct 7, 2024

DataGridPro pin columns is working fine. Just have to update the demo for Disable detail panel section. Have raised a PR for the same #14854

@michelengelen michelengelen changed the title Pinning functionality dose not work for columns [docs] Pinning functionality dose not work for columns in docs example Oct 7, 2024
@michelengelen michelengelen added support: docs-feedback Feedback from documentation page and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Oct 7, 2024
Copy link

github-actions bot commented Oct 8, 2024

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

@masoud-keykha How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! support: docs-feedback Feedback from documentation page
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants