Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Subviews removed on ListView when implementing tableViewEditActionsForRowAtIndexPath #9352

Copy link
Copy link
Open
@BozzaDaniel

Description

@BozzaDaniel
Issue body actions

I have implemented tableViewEditActionsForRowAtIndexPath on a ListView (with a custom delegate) and when I swipe on any row in the ListView all subviews of the container view of the item template is removed:

Say I have the following template (simplified):

<ListView for="item in items">
    <v-template>
        <GridLayout columns="auto, *, auto">
             <Image src="res://my-icon" col="0" />
             <Label :text="item.title" />
             <Image src="res://arrow-icon" col="2" />
        </GridLayout>
    </v-template>
</ListView>

The Images and Labels are removed from the view hierarchy. The GridLayout remains.

Using recuriseDescription in the tableviewcell in tableViewEditActionsForRowAtIndexPath before returning any results in the following (note, not the same layout as in the above example):

<ListViewCell: 0x105fe51d0; baseClass = UITableViewCell; frame = (0 86.3333; 375 92); autoresize = W; layer = <CALayer: 0x280dc7aa0>>
   | <UITableViewCellContentView: 0x105fe4dc0; frame = (0 0; 375 92); gestureRecognizers = <NSArray: 0x28024a040>; layer = <CALayer: 0x280dc7c40>>
   |    | <UIView: 0x105fe5730; frame = (0 0; 375 92); clipsToBounds = YES; tag = 197; layer = <CALayer: 0x280dd8a20>>
   |    |    | <UIView: 0x105fe58a0; frame = (0 0; 375 91); clipsToBounds = YES; tag = 198; layer = <CALayer: 0x280dd9520>>
   |    |    |    | <UIImageView: 0x105fe5a10; frame = (20 20; 50 50); clipsToBounds = YES; opaque = NO; tag = 199; layer = <CALayer: 0x280dda300>>
   |    |    |    | <UIImageView: 0x105fe5be0; frame = (33 33; 24 24); clipsToBounds = YES; opaque = NO; tag = 200; layer = <CALayer: 0x280ddb2c0>>
   |    |    |    | <UIView: 0x105fe5db0; frame = (90 20; 243 50); tag = 201; layer = <CALayer: 0x280ddf400>>

As the swipe begins the subviews are removed.

Performing the swipe again results in the follwing recursiveDescription:

<ListViewCell: 0x105fe51d0; baseClass = UITableViewCell; frame = (0 86.3333; 375 92); autoresize = W; layer = <CALayer: 0x280dc7aa0>>
   | <UITableViewCellContentView: 0x105fe4dc0; frame = (0 0; 375 92); gestureRecognizers = <NSArray: 0x28024a040>; layer = <CALayer: 0x280dc7c40>>
   |    | <UIView: 0x105fe5730; frame = (0 0; 375 92); clipsToBounds = YES; tag = 197; layer = <CALayer: 0x280dd8a20>>
   |    |    | <CALayer: 0x280dc8fc0> (layer)
   |    |    |    | <CAShapeLayer: 0x280dca5e0> (layer)
   | <_UITableViewCellSeparatorView: 0x105fe6670; frame = (15 91.6667; 360 0.333333); layer = <CALayer: 0x280dcb6c0>>

All subviews of UIView 0x105fe5730 have been removed.

Scrolling the cell out of view and in again restores the missing views.

Am I missing something or does Nativescript removing the cells for some reason when the swipe begins?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.