alfresco-ng2-components/docs/content-services/components/categories-management.component.md
Mykyta Maliarchuk c642d0e5c2
[ACS-6150] Add category selector dialog (#9423)
* [ACS-6150] add category selector dialog

* [ACS-6150] fix import

* [ACS-6150] cr fix

* [ACS-6150] cr fix

* [ACS-6150] change describe name

* [ACS-6150] linting

* [ACS-6150] style fix

* [ACS-6150] align styles
2024-03-20 08:56:01 +01:00

2.8 KiB

Title, Added, Status, Last reviewed
Title Added Status Last reviewed
Categories management component v6.0.0-A.3 Active 2023-04-07

Categories management component

Component allows to both assign/unassign categories to content and create multiple categories depending on selected mode. In assign mode component is composed of: list of categories that will be assigned to a file, input to search for existing categories that user can select and second list under the input containing existing categories that node can be assigned to. In crud mode component is composed of: list of categories that will be created, input to type a name of category that will be created and a list of categories existing under a given parent, in this mode existing categories are not selectable.

Basic Usage

<adf-categories-management
    [(categoryNameControlVisible)]="categoryControlVisible"
    [disableRemoval]="saving"
    [categories]="categories"
    [parentId]="parentId"
    [managementMode]="categoriesManagementMode"
    [classifiableChanged]="classifiableChanged"
    [multiSelect]="multiSelect"
    (categoriesChange)="storeCategoriesToAssign($event)">
</adf-categories-management>

Class members

Properties

Name Type Default value Description
categories Category[] [] List of categories to assign/create.
categoryNameControlVisible boolean false Determines if category name control is visible.
classifiableChanged Observable<void> (optional) Observable emitting when classifiable aspect changes for a given node.
disableRemoval boolean false Determines if categories assigned/created can be unassigned/removed from the list.
managementMode CategoriesManagementMode Management mode determines if component works in assign/unassign mode or create mode.
parentId string (optional) ID of a parent category that new categories will be created under.
multiSelect boolean true (optional) Toggles multiselect mode.

Events

Name Type Description
categoriesChange EventEmitter<Category> Emitted when categories list changes.
categoryNameControlVisibleChange EventEmitter<boolean> Emitted when category name control visibility changes.