icon-selector/icon-selector-modal/icon-selector-modal.component.ts
selector | c8y-icon-selector-modal |
templateUrl | ./icon-selector-modal.component.html |
Properties |
Methods |
constructor(bsModal: BsModalRef)
|
||||||
Parameters :
|
close |
close()
|
Returns :
void
|
saveChanges |
saveChanges()
|
Returns :
void
|
selectionChange | ||||||
selectionChange(newSelection: string)
|
||||||
Parameters :
Returns :
void
|
currentSelection |
Type : string
|
iconCategoriesToExclude |
Type : string[]
|
Default value : []
|
Readonly result |
Type : Promise<string>
|
Default value : new Promise((resolve, reject) => {
this.save = resolve;
this.cancel = reject;
})
|
saveButtonLabel |
Type : string
|
Default value : gettext('Select')
|
showIconClass |
Default value : true
|
title |
Type : string
|
Default value : gettext('Select icon')
|
<div class="modal-header">
<h4 class="modal-title pull-left">{{ title | translate }}</h4>
</div>
<div class="modal-body">
<c8y-icon-selector
(onSelect)="selectionChange($event)"
[selectedIcon]="currentSelection"
[iconCategoriesToExclude]="iconCategoriesToExclude"
[showIconClass]="showIconClass"
></c8y-icon-selector>
</div>
<div class="modal-footer separator text-center">
<button class="btn btn-default" (click)="close()">
{{ 'Cancel' | translate }}
</button>
<button class="btn btn-primary" [disabled]="!currentSelection" (click)="saveChanges()">
{{ saveButtonLabel | translate }}
</button>
</div>