Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
sussol-react-table
Advanced tools
A Sussol themed wrapper and simple API for the blueprintjs table component
A wrapper and simple API for using the blueprintjs data table
yarn add sussol-react-table
or
npm install sussol-react-table
Prop | Type | Description |
---|---|---|
cellAutoHeight | `Object | Boolean` |
cellDataKey | String | Pass a key (object property) from your table data set as a string. The data's key will be used to access a value – the unique key. Good for selecting the table row and loading a corresponding component, based on the selected key. e.g. { ... code: 123456789, ...} |
columns | Array | [{ key: String, title: String, ?sortable: Boolean, ?align: "left|center|right" }] Column headers for the table. |
coreCellProps | Object | Pass any core Blueprint <Table /> props through. |
tableData | Array | [{ any }] Must contain at least the valid columns keys. |
defaultColumnAlign | String | "left|center|right" The CSS text alignment for all table cells. Defaults to "left" . A column's align key takes precedence. |
defaultSortKey | String | The default column key for sorting the table data. If no key is set, nothing is done. Be sure your data already exists when the component initialises (i.e. {this.state.data.length && ... ). |
defaultSortOrder | String | "asc|desc" If defaultSortKey is set, determines the default column sort direction on initialisation. Defaults to "asc" . |
coreEditableCellProps | Object | An object of Blueprint <EditableCell /> props to pass through. All handler functions will be passed value: String, row: Number, { column:Number, columnKey:String }:Object , which differs slightly from the default implementation options. |
loadingRowCount * | Number | If set, table will show the core loading state for rows/cells equal to the value of loadingRowCount . Defaults to 0 . |
NOTE:
<Table />
component.loadingRowCount
, if using sussol-react-table@next
, will most likely need to be styled (e.g. add background-color
) by extending the .pt-table-container .pt-loading .pt-skeleton { ... }
selector.import React from 'react';
import { SussolReactTable } from 'sussol-react-table';
const columns = [
{
key: 'name',
title: 'Name',
sortable: true,
},
{
key: 'code',
title: 'Code',
sortable: true,
},
{
key: 'group',
title: 'Editable Column',
editable: true,
},
];
const data = [];
for (let i = 0; i < 100; i++) {
data.push({ code: `code${i}`, name: `name${i}`, group: `group${i % 2}` });
}
export class App extends React.Component {
render() {
return (
<div style={{ height: 400 }}>
<h1>A Beautiful table</h1>
<SussolReactTable
columns={columns}
tableData={data}
cellDataKey="code"
/>
</div>
);
}
}
You will need include the following styles via your index.html
(or by bundling them). Make sure the path to styles is correct.
path/to/node_modules/@blueprintjs/core/dist/blueprint.css
path/to/node_modules/@blueprintjs/table/dist/table.css
path/to/node_modules/normalize.css/normalize.css
(good for resetting to safe, base styles for most all browsers)sussol-react-table
run yarn build
yarn add file:path/to/sussol-react-table
Read up on the API for the blueprintjs table component.
FAQs
A Sussol themed wrapper and simple API for the blueprintjs table component
The npm package sussol-react-table receives a total of 3 weekly downloads. As such, sussol-react-table popularity was classified as not popular.
We found that sussol-react-table demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
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.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.