By default we have two collection views for a document type’s viewing options: table and grid.
Can I somehow create a new one from scratch? I need to add a filtering capability and for this I assume I need to create something new instead.
There’s no documentation on it, but I found where the default table collection view is and I copied that and made modifications to use my own collection view.
import { getPropertyValueByAlias } from '../index.js';
import { UMB_EDIT_DOCUMENT_WORKSPACE_PATH_PATTERN } from '../../../paths.js';
import type { UmbDocumentCollectionItemModel } from '../../types.js';
import type { UmbDocumentCollectionContext } from '../../document-collection.context.js';
import { UMB_DOCUMENT_COLLECTION_CONTEXT } from '../../document-collection.context-token.js';
import { UMB_DOCUMENT_ENTITY_TYPE } from '../../../entity.js';
import type { UmbCollectionColumnConfiguration } from '@umbraco-cms/backoffice/collection';
import { css, customElement, html, state } from '@umbraco-cms/backoffice/external/lit';
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
import type { UmbModalRouteBuilder } from '@umbraco-cms/backoffice/router';
import type {
UmbTableColumn,
UmbTableConfig,
UmbTableDeselectedEvent,
UmbTableElement,
UmbTableItem,
UmbTableOrderedEvent,
UmbTableSelectedEvent,
} from '@umbraco-cms/backoffice/components';
This file has been truncated. show original
I also had to copy the manifest and some of the column elements to get it to look right.
I am also lost on how to add other filters however
1 Like