-
-
Save ColadaFF/5decec9f5bb3414acacc28e07f140f0b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {Component} from 'react'; | |
import {connect} from 'react-redux'; | |
import {bindActionCreators} from 'redux'; | |
import {clientsFindServer} from './actions'; | |
class SearchBarClient extends Component{ | |
constructor(props) { | |
super(props); | |
this._handleClientsFind = this._handleClientsFind.bind(this); | |
} | |
_handleClientsFind(e){ | |
//e.preventDefault(); | |
const {clientsFindServer} = this.props; | |
clientsFindServer('', 0, 100); | |
} | |
render(){ | |
return( | |
<div style={{paddingBottom:"15px", borderBottom:"2px solid #D9DEDF"}}> | |
<div style={{margin:"auto", width:"80%", marginTop:"15px"}}> | |
<input id="searchExpression" type="search" className="form-control input-lg" placeholder="Búsqueda por cliente, NIT o grupo económico" style={{width:"93%",}} /> | |
<span className="input-group-btn" style={{width:"5%",}}> | |
<button id="searchClients" className="btn btn-default btn-large" type="button" onClick={this._handleClientsFind}><i className="icon-search"></i></button> | |
</span> | |
</div> | |
</div> | |
) | |
} | |
} | |
function mapDispatchToProps(dispatch){ | |
return bindActionCreators({ | |
clientsFindServer | |
}, dispatch); | |
} | |
function mapStateToProps({clientR}, ownerProps){ | |
return { | |
clientR | |
}; | |
} | |
export default connect(mapStateToProps, mapDispatchToProps)(SearchBarClient); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment