Nativescript Angular アプリの RadListView Ui リストの itemReorder ブール値を動的に変更しようとしていますが、成功しませんでした。毎回このエラーが発生します: Behavior is not attached to RadListView, use RadListView addbehavior method to attach it.
HTML:
<GridLayout tkExampleTitle tkToggleNavButton class="proposedLettersRow">
<RadListView #itemReord [items]="items" selectionBehavior="LongPress" reorderMode = "Drag" [itemReorder]="itemReorder" (itemReordered)="onItemReordered($event)" multipleSelection= "false"
>
<ng-template tkListItemTemplate let-item="item">
<GridLayout class="listItemTemplateGrid" >
<Label
[text]="item"
[ngClass]="!isWin ? 'proposed' : 'proposedIsDone'"
class="list-group-item ">
</Label>
</GridLayout>
</ng-template>
<ListViewGridLayout tkListViewLayout
scrollDirection="Vertical"
height="150"
ios:itemHeight="150"
spanCount="7"
horizontalAlignment="center">
</ListViewGridLayout>
</RadListView>
</GridLayout>
タイプスクリプト:
最初に this.itemReorder が true に設定されていて、それを false に変更する関数が来て、この関数を実行するとエラーが表示されます。