canonical / canonical/react-components
[ModularTable] Add prop for plugin passthrough
- Dominant language
- TypeScript
- Stars
- 151
- Forks
- 74
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 11
Description
React Table `useTable` takes `n` arguments after the first for plugins.
```js
const instance = useTable(
{
data: [...],
columns: [...],
},
useGroupBy,
useFilters,
useSortBy,
useExpanded,
usePagination
)
```
In order to implement the grouping in the [Juju Dashboards](https://github.com/canonical-web-and-design/jaas-dashboard) Action Logs UI it looks like using `useExpanded` with the default be expanded might be the best way to implement this functionality. To this end I'd like to expand [ModularTable](https://github.com/canonical-web-and-design/react-components/blob/master/src/components/ModularTable/ModularTable.tsx#L31) to take a `plugins` prop to be expanded out when calling `useTable`.

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.