![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
react-table-hoc-fixed-columns
Advanced tools
Higher Order Components for ReactTable. It make possible to fixed one or more columns on the left and/or on the right.
npm install react-table-hoc-fixed-columns@next --save
It's really simple: add fixed
property to your columns with value left
and right
Note: for migration to v0.1.x
to v1.x.x
, fixed: true
is equivalent to fixed: left
, no need to change the value.
import ReactTable from 'react-table';
import withFixedColumns from 'react-table-hoc-fixed-columns';
const ReactTableFixedColumns = withFixedColumns(ReactTable);
...
render () {
return (
<ReactTableFixedColumns
data={data}
columns={[
{
Header: 'First Name',
accessor: 'firstName',
fixed: 'left',
},
{
Header: 'Last Name',
accessor: 'lastName',
fixed: 'left',
},
...
{
Header: 'age',
accessor: 'age',
fixed: 'right',
}
]}
/>
)
}
Fixed columns also work with groups.
Tips: if your table contain at least one header group, place yours fixed columns into a group too (even with an empty Header name)
import ReactTable from 'react-table';
import withFixedColumns from 'react-table-hoc-fixed-columns';
const ReactTableFixedColumns = withFixedColumns(ReactTable);
...
render () {
return (
<ReactTableFixedColumns
data={data}
columns={[
{
Header: 'Group names',
fixed: 'left',
columns: [
{
Header: 'First Name',
accessor: 'firstName',
},
{
Header: 'Last Name',
accessor: 'lastName',
},
]
},
{
Header: 'Other group',
columns: [
...
]
}
]}
/>
)
}
Notes:
It's a workaround, because the main ReactTable
package currently not provide a way to have fixed columns.
animation is not always smooth, it depend on your browser, OS, and scroll trigger (mouse wheel or scroll bar), but it works.
fixed columns works on simple column or groups
fixed columns are resizable
works with differents cell height
If you need to access ReactTable ref, use innerRef
:
render () {
return (
<ReactTableFixedColumns
innerRef={(ref) => { this.tableRef = ref; }}
/>
)
}
Follow these steps to get started developing :
git clone https://github.com/guillaumejasmin/react-table-hoc-fixed-columns.git
npm install
npm run lib:watch
- Transpile the src/lib
folder in watch modenpm run docs
- start a development server with the demo website based on the src/docs
folder.FAQs
ReactTable HOC for fixed columns
The npm package react-table-hoc-fixed-columns receives a total of 0 weekly downloads. As such, react-table-hoc-fixed-columns popularity was classified as not popular.
We found that react-table-hoc-fixed-columns demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.