Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
usereactable
Advanced tools
Readme
UseReactTable is a React package that provides fast, flexible, and simple data tables for displaying tabular data. It supports features such as sorting, filtering, and pagination and is built on the power of React.js.
To use UseReactTable in your React project, install it via npm:
npm install --save usereactable
There might be hidden bugs lurking around any corner. I'll try to tag any releases with breaking changes.
Note: Feel free to submit new issues here.
The simplest example:
import { useEffect, useState } from "react";
import Datatable from "usereactable";
const App = () => {
const columns = [
{
headerName: "First Name",
field: "firstName",
},
{
headerName: "Last Name",
field: "lastName",
},
{
headerName: "Maiden Name",
field: "maidenName",
},
{
headerName: "Maiden Name",
field: "image",
},
{
headerName: "Age",
field: "age",
style: {
color: "green",
},
},
];
const [data, setdata] = useState([]);
useEffect(() => {
fetch("https://dummyjson.com/users?limit=100")
.then((res) => res.json())
.then((data) => setdata(data.users.slice(0, 100)));
}, []);
return (
<div>
<Datatable
rows={data}
columns={columns}
title={"Customer list"}
actionButtons
excelDownload
pagination
/>
</div>
);
};
export default App;
While pretty basic, this example demonstrates a couple things:
<table>
Name | Type | Required | Default | Description |
---|---|---|---|---|
title | string | Yes | null | Heading of the table |
rows | array | Yes | [] | array of objects |
columns | array | Yes | null | List of cols which gone be see in the table |
subTitle | string | Yes | undefined | Sub-Heading of the table |
style | CSS Styles | No | null | Add styles to table container |
className | string | No | null | Add className to table container |
tableheadstyle | CSS Styles | No | undefined | change style of table heading |
searchAble | boolean | No | true | Show / Hide search box from table |
tableheadstyle | CSS Styles | No | undefined | change style of table heading |
tablerowstyle | CSS Styles | No | undefined | change style of table's row |
pagination | boolean | No | false | Add pagination to table |
actionButtons | boolean | Object | no | false |
selection | boolean | No | false | Enables / disable the row selection in table |
excelDownload | boolean | No | false | Enables / disable the feature of download data in excel file |
removefromExcel | boolean | No | undefined | Removes the key's from excel file from download |
onEditBtnClick | function | No | undefined | Function on edit button click |
onDeleteBtnClick | function | No | undefined | Function on delete button click |
keysToExcludeFromView | string[] | No | undefined | hide keys from default view model |
viewButton | React Element | No | undefined | Add custom view button in the table |
editButton | React Element | No | undefined | Add custom edit button in the table |
deleteButton | React Element | No | undefined | Add custom delete button in the table |
modalClassName | string | No | undefined | add classname to modal container |
modalStyle | React Css Properties | No | undefined | To change modal style |
FAQs
UseReactTable is a React package that provides fast, flexible, and simple data tables for displaying tabular data. It supports features such as sorting, filtering, and pagination and is built on the power of [React.js](https://reactjs.org/).
The npm package usereactable receives a total of 4 weekly downloads. As such, usereactable popularity was classified as not popular.
We found that usereactable demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.