-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow pinning DataGrid columns using the column config (#2452)
When using `DataGridPro` or `DataGridPremium` with the `usePersistentColumnState` hook. ```tsx const columns: GridColDef[] = [ { field: "title", pinned: "left", }, // ... other columns { field: "actions", pinned: "right", }, ]; ```
- Loading branch information
1 parent
b7646db
commit 0fb8d9a
Showing
4 changed files
with
47 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
"@comet/admin": minor | ||
--- | ||
|
||
Allow pinning DataGrid columns using the column config when using `DataGridPro` or `DataGridPremium` with the `usePersistentColumnState` hook | ||
|
||
```tsx | ||
const columns: GridColDef[] = [ | ||
{ | ||
field: "title", | ||
pinned: "left", | ||
}, | ||
// ... other columns | ||
{ | ||
field: "actions", | ||
pinned: "right", | ||
}, | ||
]; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters