This question is locked. New answers and comments are not allowed.
Hi
Fo my nativescript angular app I wanted to detect the number of matching suggestions that are shown in the suggestion view so that I can trigger a specific action when no matching suggestions are found. I tried the following code which seems to work in IOS but not in android. Please advise on how I can get the number of matching suggestions on both IOS and android.
Template
<RadAutoCompleteTextView row="6" #autocmp [items]="dataItems" suggestMode="Suggest" completionMode="Contains" displayMode="Tokens" (itemLoading)="onTagSuggestionsLoading($event)" (suggestionViewBecameVisible)="onSuggestionViewBecameVisible($event)" layoutMode="Horizontal"<br> (didAutoComplete)="onDidAutoComplete($event)" (tokenAdded)="onTokenAdded($event)" (tokenRemoved)="onTokenRemoved($event)"> <SuggestionView tkAutoCompleteSuggestionView> <ng-template tkSuggestionItemTemplate let-item="item"> <StackLayout orientation="horizontal" padding="5"> <Label [text]="item.text"></Label> </StackLayout> </ng-template> </SuggestionView></RadAutoCompleteTextView>
TS code
onSuggestionViewBecameVisible(args) { self.numberOfMatchingTags = args._object.filteredItems.length; if (self.numberOfMatchingTags === 0) { self.addOwnTag(); }}
