mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
* ACS-7391: breadcrumb component * ACS-7392: category management as standalone * ACS-7405: tree component as standalone * ACS-7396: content dialogs as standalone * ACS-7396: content dialogs as standalone * ACS-7396: content dialogs as standalone * ACS-7396: content dialogs as standalone * mark material module for deprecation [ci:force]
1.7 KiB
1.7 KiB
Title, Added, Status, Last reviewed
Title | Added | Status | Last reviewed |
---|---|---|---|
Category selector dialog component | v6.8.0 | Active | 2024-03-12 |
Category Selector Dialog
Allows the user to select one or multiple categories.
Dialog inputs
Name | Type | Default value | Description |
---|---|---|---|
select | Subject<Category[]> |
Emits an array of selected categories when the dialog closes | |
multiSelect | boolean |
true |
(optional) Toggles multiselect mode |
Basic Usage
export class MyComponent {
constructor(private dialog: MatDialog) {
}
openCatDialog() {
const data: CategorySelectorDialogOptions = {
select: new Subject<Category[]>(),
multiSelect: false
};
this.dialog.open(CategorySelectorDialogComponent, {
data,
width: '400px'
});
data.select.subscribe((selections) => {
// ...
});
}
}
All the results will be streamed to the select
subject present in the CategorySelectorDialogOptions
object passed to the dialog.
When the category is selected by clicking the Select
button, the options.select
stream will be completed.
Details
This component lets the user select categories. Use the Angular MatDialog
service to open the dialog, as shown in the example, and pass a options
object
with properties.