Skip to content

Commit

Permalink
lisititem fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Sankhadeep committed Sep 7, 2016
1 parent 9063ae6 commit 4a4297c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Components/Widgets/ListItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ export default class ListItemNB extends NativeBaseComponent {
if(child.type == Icon)
iconComponentPresent = true;
})

return iconComponentPresent;
}

Expand Down Expand Up @@ -359,6 +358,7 @@ export default class ListItemNB extends NativeBaseComponent {
}

renderChildren() {
this.iconPresent();

var newChildren = [];
if(!Array.isArray(this.props.children) && !this.inlinePresent() && !this.stackedPresent() && !this.insetPresent()) {
Expand Down Expand Up @@ -419,6 +419,7 @@ export default class ListItemNB extends NativeBaseComponent {
</View>);
newChildren.push(React.cloneElement(iconElement[0], {...this.getChildProps(iconElement[0]), key: 'listItem1'}));
}

else if (this.badgePresent()) {

var badgeElement = _.remove(childrenArray, function(item) {
Expand All @@ -434,8 +435,7 @@ export default class ListItemNB extends NativeBaseComponent {
</View>);
newChildren.push(React.cloneElement(badgeElement[0], {...this.getChildProps(badgeElement[0]), key: 'listItem1'}));
}
else if (this.props.icon
&& this.props.iconLeft) {
else if (this.props.iconLeft && this.props.iconRight) {

iconElement = _.filter(childrenArray, function(item) {
if(item.type == Icon) {
Expand Down

0 comments on commit 4a4297c

Please sign in to comment.