Skip to content

Commit b4e1347

Browse files
Himanshu SatijaHimanshu Satija
authored andcommitted
add func to check if button is present
1 parent c560741 commit b4e1347

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Components/Widgets/ListItem.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,16 @@ export default class ListItemNB extends NativeBaseComponent {
9393
return iconComponentPresent;
9494
}
9595

96+
buttonPresent() {
97+
var buttonComponentPresent = false;
98+
React.Children.forEach(this.props.children, function (child) {
99+
if(child.type == Button)
100+
buttonComponentPresent = true;
101+
})
102+
103+
return buttonComponentPresent;
104+
}
105+
96106
getChildStyle(child) {
97107
var mergedStyle = {};
98108
if(child.type == Icon) {

0 commit comments

Comments
 (0)