Skip to main content

Document List

Renders a vertical and selectable list of DocumentBoxes, with an ActionBar

Storybook Docs

Props

NameTypeDefaultDescription
documents *IDocument[]-
selectedDocuments *IDocument[]-
actionIAction<IDocument | IDocument[]>[]-
actionBarPropsOmit<IActionBarProps<IDocument>, 'actions' | 'selectedElements' >-Extra props for the internal ActionBar component, omitting actions and selectedElements which are handled by this component
onDocumentSelected(document: IDocument, isSelected: boolean) => void-Called when
...--extends SelectableList props, omitting children, onSelectChange and selectedIndexes which are handled by this component

IDocument

A data object that will be rendered as a DocumentBox in the list

AttributeTypeDescription
id *number | stringInternal ID of the object, not displayed
authorstringText displayed as the author of the document
contentReactNodeMain content displayed in the document box
datestringText displayed as the date of the document
iconType[IconMap](../../shared-types/icon-map)Icon indicating the filetype of the document, one of the IconMap values
pathstringText displayed as the path of the document
titlestringText displayed as the title of the document