diff --git a/src/components/ItemTable/ItemTable.stories.mdx b/src/components/ItemTable/ItemTable.stories.mdx index 8c37299..901f522 100644 --- a/src/components/ItemTable/ItemTable.stories.mdx +++ b/src/components/ItemTable/ItemTable.stories.mdx @@ -1,35 +1,63 @@ -import { Meta, Story, Canvas } from '@storybook/addon-docs/blocks'; -import ItemTable from './ItemTable'; +import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs/blocks'; +import ItemTable from './ItemTable'; -The ItemTable is the primary view for webqueue2. It displays item metadata for items of selected queues and allows for filtering by field and opening an item by clicking. Items are passed in as a required parameter. It is to be used with the [ItemTableAppBar](?path=/docs/components-itemtableappbar--default-story). -It is based on [react-table](https://react-table.tanstack.com/). + - +Renders a table of Item metadata and allows for per column filtering. It is based on [react-table](https://react-table.tanstack.com/). -# ItemTable Loading Content (Loading) +### With Items +Pass an array of Item objects to the `data` prop. + + + { args => } + + +### Loading +Set the `loading` prop to true during asynchronous data fetches. - - {args => } - - + + { args => } + + -# ItemTable With Content(Loaded) +### Selected Styling +Due to a bug in MUI Table, the `rowCanBeSelected` prop has been added to control whether rows can be selected. When this is true, rows ca be selected and styled. This this is false, row selection styling is removed. +See [this GitHub issue](https://github.itap.purdue.edu/ECN/webqueue2-frontend/issues/117) for more info. - - - {args => } - - + \ No newline at end of file