Nativescript-ui-feedback: IOS RadListView ng-template with custom component (+ ListViewGridLayout ) crash the app

Created on 6 Mar 2019  路  4Comments  路  Source: ProgressNS/nativescript-ui-feedback

I have IOS problem in RadListView. The list view works perfectly as long as I have inline view component declared like below

<GridLayout [visibility]="!isLoading && !isError ? 'visible' : 'collapse'"
                      class="item-boxes" height="100%">
    <RadListView [items]="categoryItems" pullToRefresh="true"
                            (pullToRefreshInitiated)="onPullToRefreshInitiated($event)"
                             loadOnDemandMode="Auto
                            (loadMoreDataRequested)="onLoadMoreItemsRequested($event)">
        <ng-template tkListItemTemplate let-item="item">
            <FlexboxLayout class="item-box">
                 <Label [text]="item.name"></Label>
            </FlexboxLayout>
        </ng-template>
        <ListViewGridLayout tkListViewLayout
                                            ios:itemHeight="200"
                                            scrollDirection="Vertical"
                                            spanCount="2"></ListViewGridLayout>
    </RadListView>
</GridLayout>

I'd like to make each item-box separate view so I create ItemBoxComponent. Android works fine this code but ios crash app. No error out in console. What can I do? Thanx for your help.

<GridLayout [visibility]="!isLoading && !isError ? 'visible' : 'collapse'"
                      class="item-boxes" height="100%">
    <RadListView [items]="categoryItems" pullToRefresh="true"
                            (pullToRefreshInitiated)="onPullToRefreshInitiated($event)"
                             loadOnDemandMode="Auto
                            (loadMoreDataRequested)="onLoadMoreItemsRequested($event)">
        <ng-template tkListItemTemplate let-item="item">
            <ItemBox [item]="item"></ItemBox>
        </ng-template>
        <ListViewGridLayout tkListViewLayout
                                            ios:itemHeight="200"
                                            scrollDirection="Vertical"
                                            spanCount="2"></ListViewGridLayout>
    </RadListView>
</GridLayout>

Miklos

backlog bug listview ios high

All 4 comments

@PraktikerNeosoft thank you for the details information! I was able to reproduce the issue by using your snippets in this demo app so marking this one as a bug.

Steps to reproduce:

  • clone and run the app no iOS
  • The app immediately crashes if we use custom component which is not wrapped in another layout or if we use ListViewGridLayout - happening only on iOS - Android works as expected.

As a temporary workaround wrap the custom component in a layout and remove the ListViewGridLayout for the iOS implementation. I will follow up any related information once we have more insights.

@NickIliev Lot of thnx. My list layout has 2 columns so i'd like to use ListViewGridLayout.
I'm waiting for bugfix. Miklos

@NickIliev We're waiting for the bugfix yet.
Could you tell me when is expected to come?
It would be very important to finalize our application.

I look forward to receiving your reply.
Balint

Released with [email protected]

Was this page helpful?
0 / 5 - 0 ratings