Skip to content

Commit 853abc2

Browse files
authored
3.1.0 #219
2 parents da44f72 + 5b774aa commit 853abc2

File tree

5 files changed

+11
-1
lines changed

5 files changed

+11
-1
lines changed

RNTableView/RNTableView.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
@property(nonatomic) BOOL customCells;
3838
@property(nonatomic) BOOL editing;
3939
@property(nonatomic) BOOL moveWithinSectionOnly;
40+
@property(nonatomic) BOOL allowsSelectionDuringEditing;
4041
@property(nonatomic, assign) UIEdgeInsets contentInset;
4142
@property(nonatomic, assign) CGPoint contentOffset;
4243
@property(nonatomic, assign) UIEdgeInsets scrollIndicatorInsets;

RNTableView/RNTableView.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ - (void)setEditing:(BOOL)editing {
4141
[self.tableView setEditing:editing animated:YES];
4242
}
4343

44+
- (void)setAllowsSelectionDuringEditing:(BOOL)allowsSelectionDuringEditing {
45+
_allowsSelectionDuringEditing = allowsSelectionDuringEditing;
46+
47+
[self.tableView setAllowsSelectionDuringEditing: allowsSelectionDuringEditing];
48+
}
49+
4450
- (void)setSeparatorColor:(UIColor *)separatorColor {
4551
_separatorColor = separatorColor;
4652

@@ -210,6 +216,7 @@ - (void)createTableView {
210216
_tableView.delegate = self;
211217
_tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
212218
_tableView.allowsMultipleSelectionDuringEditing = NO;
219+
_tableView.allowsSelectionDuringEditing = self.allowsSelectionDuringEditing;
213220
_tableView.contentInset = self.contentInset;
214221
_tableView.contentOffset = self.contentOffset;
215222
_tableView.scrollIndicatorInsets = self.scrollIndicatorInsets;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-tableview",
3-
"version": "3.0.0",
3+
"version": "3.1.0",
44
"description": "Native iOS TableView wrapper for React Native",
55
"main": "src/index.js",
66
"types": "src/index.d.ts",

src/TableView.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ class TableView extends React.Component {
196196
autoFocus: false,
197197
alwaysBounceVertical: true,
198198
scrollEnabled: true,
199+
allowsSelectionDuringEditing: false,
199200
sectionIndexTitlesEnabled: false,
200201
showsHorizontalScrollIndicator: true,
201202
showsVerticalScrollIndicator: true,

src/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ export interface TableViewProps {
232232
tableViewCellEditingStyle?: CellEditingStyle;
233233
separatorStyle?: SeparatorStyle;
234234
editing?: boolean;
235+
allowsSelectionDuringEditing?: boolean;
235236
autoFocusAnimate?: boolean;
236237
autoFocus?: boolean;
237238
alwaysBounceVertical?: boolean;

0 commit comments

Comments
 (0)