Skip to main content
Version: 1.0.5

IListViewProps

@spartanfx/react v1.0.5


@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

PropertyTypeDescription
columnsIListviewColumn[]An array of columns to be rendered in the view, each mapping to a SharePoint field.
contextWebPartContextThe SPFx web part context required for SharePoint API access and filtering.
detailsListProps?Partial<IDetailsListProps>Optional overrides for Fluent UI's DetailsList props.
disableFiltering?booleanDisables column-based filtering entirely.
disableSorting?booleanDisables column-based sorting entirely.
enableColumnSelector?booleanEnable the column selector feature allowing users to customize visible columns
extendColumns?booleanEnable the column selector to propose all available columns form the list fields.
extendedSearchBoxProps?Partial<IExtendedSearchBoxProps>Optional ExtendedSearchBox props.
forceTileView?booleanForces tile view layout regardless of screen width.
hideExport?booleanHides the Export to Excel button.
hideSearch?booleanHides the search box in the header.
hideSortAndFilterButton?booleanHides the sort and filter button in tile view.
highlightedFieldName?stringField to visually highlight in the tile view.
listViewExportToExcelProps?Partial<IListViewExportToExcelProps>Optional ListViewExportToExcel props.
listViewHeaderText?stringOptional title or header text to show at the top of the list.
listViewServiceListViewServiceA configured instance of the ListViewService to interact with the SharePoint list and its items.
onColumnsChanged?(columns) => voidCallback triggered when user changes column configuration Receives the new array of selected columns
onDismissTileViewFilterSortPane?() => voidCallback fired when the tile view filter/sort pane is dismissed.
onItemClick?(item) => voidOptional handler fired when a list item is clicked.
onLoadingStateChanged?(loading) => voidCallback triggered when the loading state changes (e.g., during item fetch).
onRenderItemCount?(itemCount) => ElementOptional onRenderItemCount. Use this to pass a custom renderer for the item count.
onRenderItemCountNumber?(itemCount) => ElementOptional onRenderItemCountContent. Use this to pass a custom renderer to render the item count number.
onRenderListViewControls?() => ElementAllows injecting custom UI controls above the list (e.g., command bar, filters).
onRenderSortAndFilterButton?(hasFilters, onClick) => ElementAllows customization of the Sort/Filter button in tile view.
onRenderTile?(item, columns) => anyOptional custom tile renderer for use with tile view mode. Deprecated Use tileListProps to pass a custom tile renderer
onSelectionChanged?(selectedItems) => anyOptional onSelectionChanged. Ignored if SelectionMode is set to none
selectionMode?SelectionModeOptional selectionMode. Default value 'none'
showItemCount?booleanOptional 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?booleanControls whether the tile view filter/sort pane is open by default.
tileViewTreshold?numberThreshold below which the tile view is enabled automatically. Default 1185
translate?(text) => stringOptional translation function for labels like buttons and filters.
translatedFields?string[]Array of field internal names that require translation of their filter values.
viewId?stringView ID for column persistence (used in localStorage key)