Skip to content

Commit

Permalink
rename renderCustomCheckBoxSource
Browse files Browse the repository at this point in the history
  • Loading branch information
helabbassi committed Feb 27, 2018
1 parent 19bf2b7 commit f02ea77
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/SelectMultiple.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default class SelectMultiple extends Component {
onSelectionsChange: PropTypes.func.isRequired,

checkboxSource: sourceType,
renderCustomCheckboxSource: PropTypes.func,
renderCheckbox: PropTypes.func,
selectedCheckboxSource: sourceType,
renderLabel: PropTypes.func,
listViewProps: PropTypes.any,
Expand Down Expand Up @@ -133,14 +133,14 @@ export default class SelectMultiple extends Component {
} = this.props

const {
renderCustomCheckboxSource,
renderCheckbox,
selectedCheckboxSource,
selectedRowStyle,
selectedCheckboxStyle,
selectedLabelStyle
} = this.props

if (!renderCustomCheckboxSource) {
if (!renderCheckbox) {
if (row.selected) {
checkboxSource = selectedCheckboxSource
rowStyle = mergeStyles(styles.row, rowStyle, selectedRowStyle)
Expand All @@ -156,8 +156,8 @@ export default class SelectMultiple extends Component {
return (
<TouchableWithoutFeedback onPress={() => this.onRowPress(row)}>
<View style={rowStyle}>
{renderCustomCheckboxSource
? renderCustomCheckboxSource(row.selected)
{renderCheckbox
? renderCheckbox(row.selected)
: <Image style={checkboxStyle} source={checkboxSource} />
}
{this.renderLabel(row.label, labelStyle, row.selected)}
Expand Down

0 comments on commit f02ea77

Please sign in to comment.