I am currently working with redux-form (v6.5.0) and have the following source code:
class MyForm extends Component {
render() {
const {error} = this.props
return (
<form>
<Field.....>
{this.renderError(error)}
</form>
);
}
renderError(error) {
if (error) {
var temp = error;
return (
<div className='alert alert-danger alert-dismissable'>
<div className="close" data-dismiss="alert" aria-label="close">×</div>
{temp}
</div>
);
} else {
return null
}
}
}
While using this setup, I encountered an issue where the error message displayed as a bootstrap alert does not disappear when clicking on the x button. Can someone please advise me on what could be causing this issue?
I attempted to manually clear the error props but was unsuccessful. Does anyone have any suggestions on how to make bootstrap3 alerts work seamlessly with react/redux-form? Thank you.