From 4a4297cce473b62c6ea7ff35d21c8bde671e4f8c Mon Sep 17 00:00:00 2001 From: Sankhadeep Date: Wed, 7 Sep 2016 13:40:10 +0530 Subject: [PATCH] lisititem fixed --- Components/Widgets/ListItem.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Components/Widgets/ListItem.js b/Components/Widgets/ListItem.js index 6a989b9d7..b20025f5d 100644 --- a/Components/Widgets/ListItem.js +++ b/Components/Widgets/ListItem.js @@ -151,7 +151,6 @@ export default class ListItemNB extends NativeBaseComponent { if(child.type == Icon) iconComponentPresent = true; }) - return iconComponentPresent; } @@ -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()) { @@ -419,6 +419,7 @@ export default class ListItemNB extends NativeBaseComponent { ); newChildren.push(React.cloneElement(iconElement[0], {...this.getChildProps(iconElement[0]), key: 'listItem1'})); } + else if (this.badgePresent()) { var badgeElement = _.remove(childrenArray, function(item) { @@ -434,8 +435,7 @@ export default class ListItemNB extends NativeBaseComponent { ); 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) {