This file contains hidden or 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
| class MySearchPanel extends React.Component { | |
| cleanBtnClick = () => { | |
| this.refs.seachInput.value = ''; | |
| this.props.search(''); | |
| } | |
| seachBanana = () => { | |
| this.refs.seachInput.value = 'banana'; |
This file contains hidden or 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
| class MySearchPanel extends React.Component { | |
| render() { | |
| return ( | |
| <div> | |
| <div className='input-group'> | |
| <span className='input-group-btn'> | |
| <button | |
| className='btn btn-primary' | |
| type='button'> | |
| CustomButton1 |
This file contains hidden or 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
| class MySearchField extends React.Component { | |
| // It's necessary to implement getValue | |
| getValue() { | |
| return ReactDOM.findDOMNode(this).value; | |
| } | |
| // It's necessary to implement setValue | |
| setValue(value) { | |
| ReactDOM.findDOMNode(this).value = value; | |
| } |
This file contains hidden or 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
| class DefaultCustomSearchFieldTable extends React.Component { | |
| createCustomSearchField = (props) => { | |
| return ( | |
| <SearchField | |
| className='my-custom-class' | |
| defaultValue={ props.defaultSearch } | |
| placeholder={ props.searchPlaceholder }/> | |
| ); | |
| } |