
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
cm-react-sticky-table
Advanced tools
A table to show data in an organized form, with interactive capabilities of sorting, searching, paginating etc and applied stickiness in columns, rows
Renders a simple table following bootstrap 3 like styles, capable of making its columns and rows stick while user scrolls. Column widths are resize-able to fit users customized needs.
# npm
npm i cm-react-sticky-table
import React from 'react';
import ReactDOM from 'react-dom';
import ReactStickyTable from 'cm-react-sticky-table';
var sampleData = [
['Row 1, Column 1', 'Row 1, Column 2', 'Row 1, Column 3'],
['Row 2, Column 1', 'Row 2, Column 2', 'Row 2, Column 3'],
['Row 3, Column 1', 'Row 3, Column 2', 'Row 3, Column 3'],
]
var sampleColumns = ['Column 1', 'Column 2', 'Column 3'];
const Comp = ({ data, columns }) => {
return (
<ReactStickyTable
data={data}
columns={columns}
/>
)
}
var elem = document.createElement('div');
document.body.appendChild(elem);
ReactDOM.render(<Comp data={[...sampleData]} columns={[...sampleColumns]} />, elem);
<ReactStickyTable
style={{}}
className=''
data=[[], [], []]
columns=[ , , ]
total={95}
stickyRows={1}
stickyColumns={2}
pageIndex={0}
pageLength={10}
colResizable={true}
movingScroller={true}
information={true}
pagination={true}
rowHeight={34}
onChange={function () {
}}
/>
style?: objectAttaches style to sticky-table container node
className?: stringAttaches class to sticky-table container node
data? Arraydata is expected to be an array of arrays, from simple structure to ever more complex.
// Simple
var data = [
['Row 1, Column 1', 'Row 1, Column 2', 'Row 1, Column 3'],
['Row 2, Column 1', 'Row 2, Column 2', 'Row 2, Column 3'],
]
// Advanced with variety of application
var data = [
[{ label: 'Row 1, Column 1', style: { color: 'red' }, title: 'Hello World!' }, { label: 'Row 1, Column 2' }],
[{ label: <span>I'm a react node</span> }, 'Row 1, Column 2'],
]
columns?: ArraySimilar to an element of data
var columns = [
{ label: 'Column 1', style: { color: 'green' }, title: 'I represent column 1 header!' },
{ label: 'Column 2' }
]
total?: numberCan be thought of as the number of rows the table has in the remote database. Helpful for pagination. If not provided, library tries to smartly figure out from rest of the given props.
stickyRows?: numberNumber of rows to make sticky. Value 1 will scroll header row when window scrolls, whereas value 2 will include the first row of the data props too.
stickyColumns?: numberNumber of columns to make sticky.
sortingIndex?: numberNot yet functional.
sortingOrder?: numberNot yet functional.
pageIndex?: numberThe page-index that the table reflects from the remote database. Helpful for pagination.
pageLength?: numberNumber of rows table is supposed to hold in a single page. Helpful for pagination.
colResizable?: booleanSetting true allows the user to control (increase / decrease) the width of a column.
movingScroller?: booleanA horizontal scroller appears at the top when the mouse enters sticky-table container. Sticks to the top of the window / container.
information?: booleanShows the range of the partial data displayed by table. Ex - Showing 1 to 10 out of 95 entries.
pagination?: booleanRenders a pagination component.
rowHeight?: number, stringIn case custom components are used to render cells which have the potential to have varying height, set rowHeight (34px, 34 etc.) of the table. Otherwise, table might display a messed-up structure.
onChange?: (key, value) => voidSends the onChange key which determines the type of change occurred, along with its associated value. Possible keys
pageIndexsortingIndex (Not yet functional)sortingOrder (Not yet functional)colSpan, rowSpan not supportedrowHeight usage)ISC
FAQs
A table to show data in an organized form, with interactive capabilities of sorting, searching, paginating etc and applied stickiness in columns, rows
We found that cm-react-sticky-table demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.