@procore/data-table-saved-views
v0.0.0
Published
Saved Views Component for Data Table
Downloads
71
Maintainers
Readme
@procore/data-table-saved-views
Saved Views Component for integration with @procore/data-table
Installation
In a web application, micro frontend or hydra client
yarn add @procore/data-table-saved-views
NOTE: Ensure that the following peer dependencies for @procore/data-table-saved-views
are also installed:
@procore/core-react
:^12
react
:>=16.8
styled-components
:^5.3.0
In a npm package or library
yarn add -P @procore/data-table-saved-views^1.0.0 # adds the package as a peer dependency
yarn add -D @procore/data-table-saved-views # adds as a dev dependency, for tests, storybook, etc.
NOTE: Ensure that the following peer dependencies for @procore/data-table-saved-views
are also installed as peer dependencies and as dev dependencies (for tests, storybook, etc.):
@procore/core-react
:^12
react
:>=16.8
styled-components
:^5.3.0
Usage
import { useSavedViews } from '@procore/data-table-saved-views';
const { SavedViews } = useSavedViews(
onSelect,
onEdit,
onDelete,
onCreate,
onUpdate,
AllItemsOptionFlag,
savedViewsGroups: savedGroups,
isAdmin: true,
currentFilters,
currentColumnState,
onTableConfigChange,
tableConfig,
tableApi,
currentRowHeight,
stickyViewsKey: 'currentSavedView');
<SavedViews />
Development
This project uses yarn
, and supports the following commands:
build
: builds and bundles the project.format
: runsprettier
on the project.format:check
: validates that the source code conforms to theprettier
configuration.lint
: lints the source code.storybook
: starts up the storybook development server on port 6006.build-storybook
: generates a static version of the storybook.test
: runs the unit test suite.test:dev
: run the unit test suite in watch mode.