src/ui/language-picker/smart-language-picker.component.ts
AbstractSmartComponent
selector | smart-language-picker |
styleUrls | ./smart-language-picker.component.css |
templateUrl | ./smart-language-picker.component.html |
Properties |
|
Methods |
|
Inputs |
Outputs |
Accessors |
constructor(sessionManager: SmartSessionManagerService, languageManager: SmartLanguageMangagerService, smartErrorHandler: SmartErrorHandlerService, serviceAdapter: SmartServiceAdapter, elementRef: ElementRef)
|
||||||||||||||||||
Parameters :
|
language-picker-allow-filter |
Type : boolean
|
languageSelected |
Type : EventEmitter<ILanguage>
|
Public onBlur |
onBlur()
|
Returns :
void
|
Public onComboSelectionChange | ||||
onComboSelectionChange(value)
|
||||
Parameters :
Returns :
void
|
Public availableLanguages |
Type : ILanguage[]
|
languageCombo |
Type : ComboBoxComponent
|
Decorators :
@ViewChild('languageCombo', {static: true})
|
languageDropdown |
Type : DropDownListComponent
|
Decorators :
@ViewChild('languageCombo', {static: true})
|
Public selectedFlagImage |
Type : string
|
selectedLanguage | ||||
getselectedLanguage()
|
||||
Returns :
ILanguage
|
||||
setselectedLanguage(value)
|
||||
Parameters :
Returns :
void
|
imageURLBase |
getimageURLBase()
|
Returns :
string
|
combo | ||||
getcombo()
|
||||
Returns :
ComboBoxComponent
|
||||
setcombo(value)
|
||||
Parameters :
Returns :
void
|
dropdown | ||||
getdropdown()
|
||||
Returns :
DropDownListComponent
|
||||
setdropdown(value)
|
||||
Parameters :
Returns :
void
|
<img id="language-flag" *ngIf="allowFiltering !== false" [src]="selectedFlagImage" />
<kendo-combobox
*ngIf="allowFiltering !== false"
#languageCombo
(blur)="onBlur()"
[clearButton]="false"
[data]="availableLanguages"
[allowCustom]="false"
[textField]="'LanguageName'"
[valueField]="'LanguageIsoCode'"
[ngModel]="selectedLanguage"
(valueChange)="onComboSelectionChange($event)">
<ng-template kendoComboBoxItemTemplate let-dataItem>
<span class="template">
<img [src]="imageURLBase + dataItem.LanguageImage">
</span>
{{dataItem.LanguageName}}
</ng-template>
</kendo-combobox>
<kendo-dropdownlist
*ngIf="allowFiltering === false"
#languageDropdown
(blur)="onBlur()"
[data]="availableLanguages"
[ngModel]="selectedLanguage"
[valuePrimitive]="false"
[textField]="'LanguageName'"
[valueField]="'LanguageIsoCode'"
(valueChange)="onComboSelectionChange($event)">
<ng-template kendoDropDownListItemTemplate let-dataItem>
<span class="template">
<img [src]="imageURLBase + dataItem.LanguageImage">
</span>
{{dataItem.LanguageName}}
</ng-template>
<ng-template kendoDropDownListValueTemplate let-dataItem>
<span class="template">
<img *ngIf="dataItem" [src]="imageURLBase + dataItem.LanguageImage">
</span>
{{dataItem?.LanguageName}}
</ng-template>
</kendo-dropdownlist>
./smart-language-picker.component.css
#language-flag {
height: 20px;
padding-right: 10px;
}