Skip to content

Commit

Permalink
[TIMOB-19098] Hide editActions after selection
Browse files Browse the repository at this point in the history
  • Loading branch information
hansemannn committed Jul 3, 2015
1 parent 56f96e3 commit 57e7cde
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions iphone/Classes/TiUIListView.m
Original file line number Diff line number Diff line change
Expand Up @@ -940,13 +940,16 @@ -(NSArray*)editActionsFromValue:(id)value
ENSURE_ARRAY(value);
NSArray* propArray = (NSArray*)value;
NSMutableArray* returnArray = nil;

for (id prop in propArray) {
ENSURE_DICT(prop);
NSString* title = [TiUtils stringValue:@"title" properties:prop];
int actionStyle = [TiUtils intValue:@"style" properties:prop];
TiColor* theColor = [TiUtils colorValue:@"color" properties:prop];

UITableViewRowAction* theAction = [UITableViewRowAction rowActionWithStyle:actionStyle title:title handler:^(UITableViewRowAction *action, NSIndexPath *indexPath){
NSString* eventName = @"rowAction";

if ([self.listViewProxy _hasListeners:eventName checkParent:NO]) {
TiUIListSectionProxy* theSection = [[self.listViewProxy sectionForIndex:indexPath.section] retain];
NSDictionary *theItem = [[theSection itemAtIndex:indexPath.row] retain];
Expand All @@ -967,6 +970,9 @@ -(NSArray*)editActionsFromValue:(id)value
[theItem release];
[theSection release];
}

// Hide editActions after selection
[[self tableView] setEditing:NO];

}];
if (theColor != nil) {
Expand Down

0 comments on commit 57e7cde

Please sign in to comment.