Closed giautm closed 7 years ago
The submitting state will work but you will not have the visual action. The reason for that is the condition within the button component.
if (icon) {
const IconComponent = submitting
? <ActivityIndicator size="small" key="icon" color={theme.Button.color} />
: <Icon key="icon" name={icon} size={14} color={theme.Button.color} />
const prop = iconPlacement === 'left'
? 'marginRight'
: 'marginLeft'
IconWrapped = React.createElement(View, {
children: IconComponent,
style: {
[prop]: 5
}
})
}
So you only get the load indicator if you have the icon property.
I want to get the load indicator if i don't have the icon property. So, can we change to this?
if (submitting || icon) {
const IconComponent = submitting
? <ActivityIndicator size="small" key="icon" color={theme.Button.color} />
: <Icon key="icon" name={icon} size={14} color={theme.Button.color} />
const prop = iconPlacement === 'left'
? 'marginRight'
: 'marginLeft'
IconWrapped = React.createElement(View, {
children: IconComponent,
style: {
[prop]: 5
}
})
}
I think this is a bug. Because what i except is: loading will show if
submitting == true
.