eakoriakin / ionic-selectable

Ionic Selectable is an Ionic versatile and highly customizable component that serves as a replacement to Ionic Select, and allows to search items, including async search, create items, customize the layout with templates and much more. It provides an intuitive API and is easy to set up and use.
MIT License
550 stars 123 forks source link

Unable to translate `group.text` using group template #449

Open sentientmachin3 opened 5 months ago

sentientmachin3 commented 5 months ago

My use case involves the usage of group templates. The issues is, when using a group template like this

...
  groupValueField="type"
  groupTextField="translatedType"
  [shouldFocusSearchbar]="true"
  closeButtonText=""
>
  <ng-template ionicSelectableGroupTemplate let-group="group">{{group.text | translate}}</ng-template>
</ionic-selectable>

I am not able to get the group.text value to be translated, using ngx-translate. I double checked and the translatedType field returns the translation key to be used; keys are in the translation files.

Versions I'm using:

{
"@ionic-angular": "^7.5.4",
"@angular/common": "^17.0.2",
"@angular/core": "^17.0.2",
"@angular/forms": "^17.0.2",
"@ng-select/ng-select": "^12.0.6",
"@ngx-translate/core": "^15.0.0"
}