Skip to content

Commit

Permalink
3.1.0 #219
Browse files Browse the repository at this point in the history
  • Loading branch information
iRoachie committed Jan 4, 2021
2 parents da44f72 + 5b774aa commit 853abc2
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions RNTableView/RNTableView.h
Expand Up @@ -37,6 +37,7 @@
@property(nonatomic) BOOL customCells;
@property(nonatomic) BOOL editing;
@property(nonatomic) BOOL moveWithinSectionOnly;
@property(nonatomic) BOOL allowsSelectionDuringEditing;
@property(nonatomic, assign) UIEdgeInsets contentInset;
@property(nonatomic, assign) CGPoint contentOffset;
@property(nonatomic, assign) UIEdgeInsets scrollIndicatorInsets;
Expand Down
7 changes: 7 additions & 0 deletions RNTableView/RNTableView.m
Expand Up @@ -41,6 +41,12 @@ - (void)setEditing:(BOOL)editing {
[self.tableView setEditing:editing animated:YES];
}

- (void)setAllowsSelectionDuringEditing:(BOOL)allowsSelectionDuringEditing {
_allowsSelectionDuringEditing = allowsSelectionDuringEditing;

[self.tableView setAllowsSelectionDuringEditing: allowsSelectionDuringEditing];
}

- (void)setSeparatorColor:(UIColor *)separatorColor {
_separatorColor = separatorColor;

Expand Down Expand Up @@ -210,6 +216,7 @@ - (void)createTableView {
_tableView.delegate = self;
_tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
_tableView.allowsMultipleSelectionDuringEditing = NO;
_tableView.allowsSelectionDuringEditing = self.allowsSelectionDuringEditing;
_tableView.contentInset = self.contentInset;
_tableView.contentOffset = self.contentOffset;
_tableView.scrollIndicatorInsets = self.scrollIndicatorInsets;
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "react-native-tableview",
"version": "3.0.0",
"version": "3.1.0",
"description": "Native iOS TableView wrapper for React Native",
"main": "src/index.js",
"types": "src/index.d.ts",
Expand Down
1 change: 1 addition & 0 deletions src/TableView.js
Expand Up @@ -196,6 +196,7 @@ class TableView extends React.Component {
autoFocus: false,
alwaysBounceVertical: true,
scrollEnabled: true,
allowsSelectionDuringEditing: false,
sectionIndexTitlesEnabled: false,
showsHorizontalScrollIndicator: true,
showsVerticalScrollIndicator: true,
Expand Down
1 change: 1 addition & 0 deletions src/index.d.ts
Expand Up @@ -232,6 +232,7 @@ export interface TableViewProps {
tableViewCellEditingStyle?: CellEditingStyle;
separatorStyle?: SeparatorStyle;
editing?: boolean;
allowsSelectionDuringEditing?: boolean;
autoFocusAnimate?: boolean;
autoFocus?: boolean;
alwaysBounceVertical?: boolean;
Expand Down

0 comments on commit 853abc2

Please sign in to comment.