Skip to main content
Version: 1.0.0

ContentFilterConfig

ContentFilterConfig is a data type that controls which content is displayed by the Content SDK components. It can be applied to a whole group with initialFilterValue on the ContentGroupElement, or to a single element with contentFilterConfig on the ContentAreaElement.

Attributes

filterTypes: TypeDefinition[]

The non-folder content types to display. All folder types are displayed by default. An empty array displays folders only.

Each TypeDefinition has the following attributes:

name: string

The type name from the SAS type definition, such as report or dataTable.

label?: string

A custom label for the type. This overrides the auto-generated label. Supply a label if you use a custom type that the type service does not recognize.

extensions?: string[]

Custom file extension names for the type. Supply extensions only if you use a type that the type service does not recognize.

excludedFolderTypes: string[]

Folder types to exclude from display. All folder types are displayed by default.

Values

folder, myFolder, userFolder, applicationDataFolder, historyFolder, favoritesFolder, trashFolder, hiddenFolder

showHiddenFolders: boolean

When true, hidden folder types are displayed. The default is false. Folder types that are listed in excludedFolderTypes are never displayed, regardless of this value.

searchIndices: string[]

The search indices to use when content is displayed as the result of a search, such as from a ContentSearchFieldElement. The default index is catalog.

queryModeFilter: string

A SAS REST filter that is forwarded to underlying service requests. For example, to display only reports, use eq(contentType,'report'). Any type that can be parented to a folder is supported.

Deprecated: use filterTypes and excludedFolderTypes instead.

Example

const cg = document.getElementById('cg');
cg.initialFilterValue = {
// Show reports along with all folder types except the Recycle Bin
filterTypes: [{ name: 'report' }],
excludedFolderTypes: ['trashFolder'],
};