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.
@githubocto/flat-ui
Advanced tools
Welcome friends! **flat-ui** is a React component that will render your flat dataset (an array of objects) in a table view:
Welcome friends! flat-ui is a React component that will render your flat dataset (an array of objects) in a table view:
It will...
diffData
datasetInstall using npm or yarn:
yarn add flat-ui
Basic usage:
import Grid from 'flat-ui';
const MyComponent = () => {
const data = [{ column1: 123 }, { column1: 234 }];
return <Grid data={data} />;
};
array
Your dataset, formatted as an array of objects, where each object is a row in the table.
array
A modified version of your main dataset, formatted as an array of objects, where each object is a row in the table. The table will show "differences" between this dataset and the main dataset:
object
column names as keys and descriptions as values.
boolean
Whether or not the table provides "download csv" and "download json" buttons.
object
column names as keys, with filter values as values:
string
for text columnsarray of numbers
for quantitative columns (numbers or dates)The user can interact with the table and update the filters, but the table will use the default filters when defaultFilters
or data
changes.
string
The name of the column you want the table to initialize sorting by. The user can interact with the table and update the sort, but the table will use the default sort when defaultSort
or data
changes.
string
The name of the column you want the table to initialize stickied to the left. The user can interact with the table and update the sticky column, but the table will use the default sticky column when defaultStickyColumnName
or data
changes.
function
A callback function whose first parameter is the grid state:
{
stickyColumnName: "",
columnNames: ["", ""],
filteredData: [{}, {}],
diffs: [{}, {}], // where __status__ is "new"|"old"|"modified"
filters: {},
sort: ["column name", "asc" or "desc"],
schema: {}, // column names : array|short-array|category|number|date
}
To get the example up & running:
yarn
yarn start
and also start the example server:
cd example
yarn
yarn start
FAQs
Welcome friends! **flat-ui** is a React component that will render your flat dataset (an array of objects) in a table view:
The npm package @githubocto/flat-ui receives a total of 86 weekly downloads. As such, @githubocto/flat-ui popularity was classified as not popular.
We found that @githubocto/flat-ui demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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
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.