column-pinning
Column pinning or column "freezing" allows you to pin columns to the left or right side of the table to keep them visible while scrolling horizontally.
We are planning to make this feature user-controllable in the near future, enabling users to pin and unpin columns. The current implementation is limited to developers defining pinned columns in the column configuration, and is not customizable by end users. We recommend using this feature with caution until user controls are implemented, as limiting user choice is antithetical to our design philosophy so the prop API and default behavior may change when user controls are added. (#651)
Pin Columns
To pin a column, set tableOptions.enableColumnPinning to true and then specify the
tableOptions.state.columnPinning.
Left-Pinned Column
<DataTable
tableOptions={{
enableColumnPinning: true,
state: {
columnPinning: {
left: ['name'],
},
},
}}
Name | Breed | Age | Birthdate | Last Checkup | Nationality | Microchip | Title | Identifier | Display Name | IP Address | Skills |
|---|---|---|---|---|---|---|---|---|---|---|---|
Filter | Filter | Filter | Filter | ||||||||
Selkirk Rex | 17 | 2008-02-08T18:48:47.009Z | 2025-03-30T17:08:37.394Z | π²π΅ | Legacy Implementation Liaison | 0 | Aric35 | 177.221.104.53 | Hunting | ||
American Shorthair | 3 | 2022-01-11T19:38:47.327Z | 2025-09-20T18:22:06.143Z | π΅π² | Principal Applications Developer | 1 | Jocelyn_Koelpin | 183.178.38.10 | Playing | ||
Havana | 17 | 2007-12-02T16:09:32.758Z | 2025-03-27T23:53:33.990Z | π³π« | Investor Applications Administrator | 2 | Kathleen.Mosciski57 | 186.101.171.88 | Hunting | ||
Japanese Bobtail | β | 2007-05-16T14:16:12.809Z | 2025-07-02T10:03:51.929Z | π¬π³ | Internal Infrastructure Planner | 3 | Crystal49 | a36a:a9ed:0bdc:1feb:1854:e72d:11a4:43cb | Purring | ||
American Wirehair | 20 | 2005-03-20T05:26:51.899Z | 2025-11-01T17:56:07.953Z | π°π | Customer Optimization Administrator | 4 | Beverly59 | 4b1b:da8f:8528:04a2:c454:39e4:da0f:b2bb | Climbing | ||
Himalayan | β | 2024-11-23T15:17:50.905Z | 2025-02-26T09:06:36.021Z | π»π¬ | Forward Identity Assistant | 5 | May.Prosacco86 | c73b:f2e2:f8db:0cef:aaa6:4d3c:8dcd:17e1 | Sleeping | ||
American Bobtail | 12 | 2013-05-10T22:59:10.107Z | 2025-03-20T13:16:31.031Z | π΄ββ οΈ | Legacy Group Manager | 6 | Audie.Hackett | 193.225.156.126 | Meowing | ||
Exotic Shorthair | 11 | 2014-02-03T02:29:26.148Z | 2025-05-07T01:49:29.124Z | π±πΉ | International Mobility Architect | 7 | Christy.Bode-Lueilwitz11 | 203.128.8.19 | Meowing | ||
Peterbald | 20 | β | 2025-01-08T03:41:04.126Z | πΊπ³ | Chief Intranet Technician | 8 | Janae7 | 11.134.30.108 | Jumping | ||
American Shorthair | 14 | 2011-05-14T02:26:51.612Z | 2025-08-22T01:07:28.240Z | π«π· | Legacy Quality Analyst | 9 | Darrel.Simonis26 | ae80:6f80:acc6:4188:fa52:edef:eefe:19f2 | Scratching |
Multiple Left-Pinned Columns
<DataTable
tableOptions={{
enableColumnPinning: true,
state: {
columnPinning: {
left: ['name', 'age', 'breed'],
},
},
}}
Name | Age | Breed | Birthdate | Last Checkup | Nationality | Microchip | Title | Identifier | Display Name | IP Address | Skills |
|---|---|---|---|---|---|---|---|---|---|---|---|
Filter | Filter | Filter | Filter | ||||||||
17 | Selkirk Rex | 2008-02-08T18:48:47.009Z | 2025-03-30T17:08:37.394Z | π²π΅ | Legacy Implementation Liaison | 0 | Aric35 | 177.221.104.53 | Hunting | ||
3 | American Shorthair | 2022-01-11T19:38:47.327Z | 2025-09-20T18:22:06.143Z | π΅π² | Principal Applications Developer | 1 | Jocelyn_Koelpin | 183.178.38.10 | Playing | ||
17 | Havana | 2007-12-02T16:09:32.758Z | 2025-03-27T23:53:33.990Z | π³π« | Investor Applications Administrator | 2 | Kathleen.Mosciski57 | 186.101.171.88 | Hunting | ||
β | Japanese Bobtail | 2007-05-16T14:16:12.809Z | 2025-07-02T10:03:51.929Z | π¬π³ | Internal Infrastructure Planner | 3 | Crystal49 | a36a:a9ed:0bdc:1feb:1854:e72d:11a4:43cb | Purring | ||
20 | American Wirehair | 2005-03-20T05:26:51.899Z | 2025-11-01T17:56:07.953Z | π°π | Customer Optimization Administrator | 4 | Beverly59 | 4b1b:da8f:8528:04a2:c454:39e4:da0f:b2bb | Climbing | ||
β | Himalayan | 2024-11-23T15:17:50.905Z | 2025-02-26T09:06:36.021Z | π»π¬ | Forward Identity Assistant | 5 | May.Prosacco86 | c73b:f2e2:f8db:0cef:aaa6:4d3c:8dcd:17e1 | Sleeping | ||
12 | American Bobtail | 2013-05-10T22:59:10.107Z | 2025-03-20T13:16:31.031Z | π΄ββ οΈ | Legacy Group Manager | 6 | Audie.Hackett | 193.225.156.126 | Meowing | ||
11 | Exotic Shorthair | 2014-02-03T02:29:26.148Z | 2025-05-07T01:49:29.124Z | π±πΉ | International Mobility Architect | 7 | Christy.Bode-Lueilwitz11 | 203.128.8.19 | Meowing | ||
20 | Peterbald | β | 2025-01-08T03:41:04.126Z | πΊπ³ | Chief Intranet Technician | 8 | Janae7 | 11.134.30.108 | Jumping | ||
14 | American Shorthair | 2011-05-14T02:26:51.612Z | 2025-08-22T01:07:28.240Z | π«π· | Legacy Quality Analyst | 9 | Darrel.Simonis26 | ae80:6f80:acc6:4188:fa52:edef:eefe:19f2 | Scratching |
Right-Pinned Column
You can also pin columns to the right side of the table.
<DataTable
tableOptions={{
enableColumnPinning: true,
state: {
columnPinning: {
right: ['nationality'],
},
},
}}
Name | Breed | Age | Birthdate | Last Checkup | Microchip | Title | Identifier | Display Name | IP Address | Skills | Nationality |
|---|---|---|---|---|---|---|---|---|---|---|---|
Filter | Filter | Filter | Filter | ||||||||
Selkirk Rex | 17 | 2008-02-08T18:48:47.009Z | 2025-03-30T17:08:37.394Z | Legacy Implementation Liaison | 0 | Aric35 | 177.221.104.53 | Hunting | π²π΅ | ||
American Shorthair | 3 | 2022-01-11T19:38:47.327Z | 2025-09-20T18:22:06.143Z | Principal Applications Developer | 1 | Jocelyn_Koelpin | 183.178.38.10 | Playing | π΅π² | ||
Havana | 17 | 2007-12-02T16:09:32.758Z | 2025-03-27T23:53:33.990Z | Investor Applications Administrator | 2 | Kathleen.Mosciski57 | 186.101.171.88 | Hunting | π³π« | ||
Japanese Bobtail | β | 2007-05-16T14:16:12.809Z | 2025-07-02T10:03:51.929Z | Internal Infrastructure Planner | 3 | Crystal49 | a36a:a9ed:0bdc:1feb:1854:e72d:11a4:43cb | Purring | π¬π³ | ||
American Wirehair | 20 | 2005-03-20T05:26:51.899Z | 2025-11-01T17:56:07.953Z | Customer Optimization Administrator | 4 | Beverly59 | 4b1b:da8f:8528:04a2:c454:39e4:da0f:b2bb | Climbing | π°π | ||
Himalayan | β | 2024-11-23T15:17:50.905Z | 2025-02-26T09:06:36.021Z | Forward Identity Assistant | 5 | May.Prosacco86 | c73b:f2e2:f8db:0cef:aaa6:4d3c:8dcd:17e1 | Sleeping | π»π¬ | ||
American Bobtail | 12 | 2013-05-10T22:59:10.107Z | 2025-03-20T13:16:31.031Z | Legacy Group Manager | 6 | Audie.Hackett | 193.225.156.126 | Meowing | π΄ββ οΈ | ||
Exotic Shorthair | 11 | 2014-02-03T02:29:26.148Z | 2025-05-07T01:49:29.124Z | International Mobility Architect | 7 | Christy.Bode-Lueilwitz11 | 203.128.8.19 | Meowing | π±πΉ | ||
Peterbald | 20 | β | 2025-01-08T03:41:04.126Z | Chief Intranet Technician | 8 | Janae7 | 11.134.30.108 | Jumping | πΊπ³ | ||
American Shorthair | 14 | 2011-05-14T02:26:51.612Z | 2025-08-22T01:07:28.240Z | Legacy Quality Analyst | 9 | Darrel.Simonis26 | ae80:6f80:acc6:4188:fa52:edef:eefe:19f2 | Scratching | π«π· |
Multiple Right-Pinned Columns
<DataTable
tableOptions={{
enableColumnPinning: true,
state: {
columnPinning: {
right:
['nationality', 'microchip', 'skills'],
},
},
}}
Name | Breed | Age | Birthdate | Last Checkup | Title | Identifier | Display Name | IP Address | Nationality | Microchip | Skills |
|---|---|---|---|---|---|---|---|---|---|---|---|
Filter | Filter | Filter | Filter | ||||||||
Selkirk Rex | 17 | 2008-02-08T18:48:47.009Z | 2025-03-30T17:08:37.394Z | Legacy Implementation Liaison | 0 | Aric35 | 177.221.104.53 | π²π΅ | Hunting | ||
American Shorthair | 3 | 2022-01-11T19:38:47.327Z | 2025-09-20T18:22:06.143Z | Principal Applications Developer | 1 | Jocelyn_Koelpin | 183.178.38.10 | π΅π² | Playing | ||
Havana | 17 | 2007-12-02T16:09:32.758Z | 2025-03-27T23:53:33.990Z | Investor Applications Administrator | 2 | Kathleen.Mosciski57 | 186.101.171.88 | π³π« | Hunting | ||
Japanese Bobtail | β | 2007-05-16T14:16:12.809Z | 2025-07-02T10:03:51.929Z | Internal Infrastructure Planner | 3 | Crystal49 | a36a:a9ed:0bdc:1feb:1854:e72d:11a4:43cb | π¬π³ | Purring | ||
American Wirehair | 20 | 2005-03-20T05:26:51.899Z | 2025-11-01T17:56:07.953Z | Customer Optimization Administrator | 4 | Beverly59 | 4b1b:da8f:8528:04a2:c454:39e4:da0f:b2bb | π°π | Climbing | ||
Himalayan | β | 2024-11-23T15:17:50.905Z | 2025-02-26T09:06:36.021Z | Forward Identity Assistant | 5 | May.Prosacco86 | c73b:f2e2:f8db:0cef:aaa6:4d3c:8dcd:17e1 | π»π¬ | Sleeping | ||
American Bobtail | 12 | 2013-05-10T22:59:10.107Z | 2025-03-20T13:16:31.031Z | Legacy Group Manager | 6 | Audie.Hackett | 193.225.156.126 | π΄ββ οΈ | Meowing | ||
Exotic Shorthair | 11 | 2014-02-03T02:29:26.148Z | 2025-05-07T01:49:29.124Z | International Mobility Architect | 7 | Christy.Bode-Lueilwitz11 | 203.128.8.19 | π±πΉ | Meowing | ||
Peterbald | 20 | β | 2025-01-08T03:41:04.126Z | Chief Intranet Technician | 8 | Janae7 | 11.134.30.108 | πΊπ³ | Jumping | ||
American Shorthair | 14 | 2011-05-14T02:26:51.612Z | 2025-08-22T01:07:28.240Z | Legacy Quality Analyst | 9 | Darrel.Simonis26 | ae80:6f80:acc6:4188:fa52:edef:eefe:19f2 | π«π· | Scratching |
Multiple Pinned Columns on Both Sides
You can even pin multiple columns on both the left and right sides of the table!
<DataTable
tableOptions={{
enableColumnPinning: true,
state: {
columnPinning: {
left: ['name', 'age', 'breed'],
right:
['nationality', 'microchip', 'skills'],
},
},
}}
Name | Age | Breed | Birthdate | Last Checkup | Title | Identifier | Display Name | IP Address | Nationality | Microchip | Skills |
|---|---|---|---|---|---|---|---|---|---|---|---|
Filter | Filter | Filter | Filter | ||||||||
17 | Selkirk Rex | 2008-02-08T18:48:47.009Z | 2025-03-30T17:08:37.394Z | Legacy Implementation Liaison | 0 | Aric35 | 177.221.104.53 | π²π΅ | Hunting | ||
3 | American Shorthair | 2022-01-11T19:38:47.327Z | 2025-09-20T18:22:06.143Z | Principal Applications Developer | 1 | Jocelyn_Koelpin | 183.178.38.10 | π΅π² | Playing | ||
17 | Havana | 2007-12-02T16:09:32.758Z | 2025-03-27T23:53:33.990Z | Investor Applications Administrator | 2 | Kathleen.Mosciski57 | 186.101.171.88 | π³π« | Hunting | ||
β | Japanese Bobtail | 2007-05-16T14:16:12.809Z | 2025-07-02T10:03:51.929Z | Internal Infrastructure Planner | 3 | Crystal49 | a36a:a9ed:0bdc:1feb:1854:e72d:11a4:43cb | π¬π³ | Purring | ||
20 | American Wirehair | 2005-03-20T05:26:51.899Z | 2025-11-01T17:56:07.953Z | Customer Optimization Administrator | 4 | Beverly59 | 4b1b:da8f:8528:04a2:c454:39e4:da0f:b2bb | π°π | Climbing | ||
β | Himalayan | 2024-11-23T15:17:50.905Z | 2025-02-26T09:06:36.021Z | Forward Identity Assistant | 5 | May.Prosacco86 | c73b:f2e2:f8db:0cef:aaa6:4d3c:8dcd:17e1 | π»π¬ | Sleeping | ||
12 | American Bobtail | 2013-05-10T22:59:10.107Z | 2025-03-20T13:16:31.031Z | Legacy Group Manager | 6 | Audie.Hackett | 193.225.156.126 | π΄ββ οΈ | Meowing | ||
11 | Exotic Shorthair | 2014-02-03T02:29:26.148Z | 2025-05-07T01:49:29.124Z | International Mobility Architect | 7 | Christy.Bode-Lueilwitz11 | 203.128.8.19 | π±πΉ | Meowing | ||
20 | Peterbald | β | 2025-01-08T03:41:04.126Z | Chief Intranet Technician | 8 | Janae7 | 11.134.30.108 | πΊπ³ | Jumping | ||
14 | American Shorthair | 2011-05-14T02:26:51.612Z | 2025-08-22T01:07:28.240Z | Legacy Quality Analyst | 9 | Darrel.Simonis26 | ae80:6f80:acc6:4188:fa52:edef:eefe:19f2 | π«π· | Scratching |