IListViewProps
@spartanfx/react / IListViewProps
Interface: IListViewProps
Props for the ListView component, a flexible and extensible SharePoint list rendering control.
Supports both traditional DetailsList and responsive TileView, as well as filtering, sorting, searching, exporting, and context menus.
Properties
| Property | Type | Description |
|---|---|---|
columns | IListviewColumn[] | An array of columns to be rendered in the view, each mapping to a SharePoint field. |
context | WebPartContext | The SPFx web part context required for SharePoint API access and filtering. |
detailsListProps? | Partial<IDetailsListProps> | Optional overrides for Fluent UI's DetailsList props. |
disableFiltering? | boolean | Disables column-based filtering entirely. |
disableSorting? | boolean | Disables column-based sorting entirely. |
enableColumnSelector? | boolean | Enable the column selector feature allowing users to customize visible columns |
extendColumns? | boolean | Enable the column selector to propose all available columns form the list fields. |
extendedSearchBoxProps? | Partial<IExtendedSearchBoxProps> | Optional ExtendedSearchBox props. |
forceTileView? | boolean | Forces tile view layout regardless of screen width. |
hideExport? | boolean | Hides the Export to Excel button. |
hideSearch? | boolean | Hides the search box in the header. |
hideSortAndFilterButton? | boolean | Hides the sort and filter button in tile view. |
highlightedFieldName? | string | Field to visually highlight in the tile view. |
listViewExportToExcelProps? | Partial<IListViewExportToExcelProps> | Optional ListViewExportToExcel props. |
listViewHeaderText? | string | Optional title or header text to show at the top of the list. |
listViewService | ListViewService | A configured instance of the ListViewService to interact with the SharePoint list and its items. |
onColumnsChanged? | (columns) => void | Callback triggered when user changes column configuration Receives the new array of selected columns |
onDismissTileViewFilterSortPane? | () => void | Callback fired when the tile view filter/sort pane is dismissed. |
onItemClick? | (item) => void | Optional handler fired when a list item is clicked. |
onLoadingStateChanged? | (loading) => void | Callback triggered when the loading state changes (e.g., during item fetch). |
onRenderItemCount? | (itemCount) => Element | Optional onRenderItemCount. Use this to pass a custom renderer for the item count. |
onRenderItemCountNumber? | (itemCount) => Element | Optional onRenderItemCountContent. Use this to pass a custom renderer to render the item count number. |
onRenderListViewControls? | () => Element | Allows injecting custom UI controls above the list (e.g., command bar, filters). |
onRenderSortAndFilterButton? | (hasFilters, onClick) => Element | Allows customization of the Sort/Filter button in tile view. |
onRenderTile? | (item, columns) => any | Optional custom tile renderer for use with tile view mode. Deprecated Use tileListProps to pass a custom tile renderer |
onSelectionChanged? | (selectedItems) => any | Optional onSelectionChanged. Ignored if SelectionMode is set to none |
selectionMode? | SelectionMode | Optional selectionMode. Default value 'none' |
showItemCount? | boolean | Optional showItemCount. Show the number of total items returned by the listViewService current configuration, including local filters applied. |
tileListProps? | Partial<ITileListProps> | Optional TileList props |
tileViewFilterSortPaneExclusions? | string[] | Field names to exclude from filter/sort pane in tile view. |
tileViewFilterSortPaneOpened? | boolean | Controls whether the tile view filter/sort pane is open by default. |
tileViewTreshold? | number | Threshold below which the tile view is enabled automatically. Default 1185 |
translate? | (text) => string | Optional translation function for labels like buttons and filters. |
translatedFields? | string[] | Array of field internal names that require translation of their filter values. |
viewId? | string | View ID for column persistence (used in localStorage key) |