Searches Groups.
<adf-cloud-group
[appName]="'simple-app'"
[mode]="'multiple'">
</adf-cloud-group>
| Name | Type | Default value | Description |
|---|---|---|---|
| appName | string | Name of the application. If specified this shows the groups who have access to the app. | |
| groupChipsCtrl | FormControl<any> | FormControl to list of group | |
| mode | ComponentSelectionMode | "single" | Group selection mode (single/multiple). |
| preSelectGroups | IdentityGroupModel[] | [] | Array of groups to be pre-selected. This pre-selects all groups in multi selection mode and only the first group of the array in single selection mode. |
| readOnly | boolean | false | Show the info in readonly mode |
| required | boolean | false | Mark this field as required |
| roles | string[] | [] | Role names of the groups to be listed. |
| searchGroupsControl | FormControl<any> | FormControl to search the group | |
| title | string | Title of the field | |
| validate | boolean | false | This flag enables the validation on the preSelectGroups passed as input. In case the flag is true the components call the identity service to verify the validity of the information passed as input. Otherwise, no check will be done. |
| Name | Type | Description |
|---|---|---|
| changedGroups | EventEmitter<IdentityGroupModel[]> | Emitted when a group selection change. |
| removeGroup | EventEmitter<IdentityGroupModel> | Emitted when a group is removed. |
| selectGroup | EventEmitter<IdentityGroupModel> | Emitted when a group is selected. |
| warning | EventEmitter<any> | Emitted when an warning occurs. |
You can specify either single selection or multiple selection (single is the default):
<adf-cloud-group></adf-cloud-group>
<adf-cloud-group
[mode]="'multiple'">
</adf-cloud-group>
Usage example:
import { ObjectDataTableAdapter } from '@alfresco/adf-core'; @Component({...}) class MyComponent { groups: any; constructor() { this.groups = [ {id: 1, name: 'Group 1'}, {id: 2, name: 'Group 2'} ]; } }
<adf-cloud-group
[mode]="'multiple'"
[preSelectGroups]="groups">
</adf-cloud-group>
You can use readonly property to set the component in readonly mode. Readonly mode will disable any interaction with the component.
<adf-cloud-group
[appName]="'simple-app'"
[mode]="'multiple'"
[preSelectGroups]="groups"
[readOnly]="true">
</adf-cloud-group>
If you want to manage each group seperately you can set their readonly property at your preference. You need to have component's readonly property set to false. Component's readonly mode overwrites groups level.
You can use readonly property to make preselected groups read-only in multiple mode.
Usage example:
import { ObjectDataTableAdapter } from '@alfresco/adf-core'; @Component({...}) class MyComponent { groups: any; constructor() { this.groups = [ {id: 1, name: 'Group 1', readonly: true}, {id: 2, name: 'Group 2', readonly: false} ]; } }
<adf-cloud-group
[mode]="'multiple'"
[preSelectGroups]="groups">
</adf-cloud-group>
from above preSelectGroups, Group 2 is removable from the preSelectGroups whereas Group 1 is readonly you can not remove them.
© 2023 Alfresco Software, Inc. All Rights Reserved.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.