You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
688 B

import React, { Component, PropTypes } from 'react';
9 years ago
function noop() {
}
class Search extends Component {
constructor(props) {
super(props);
}
9 years ago
handleChange(e) {
this.props.onChange(e);
}
render() {
const {placeholder, value} = this.props;
return <input placeholder={placeholder} className="ant-input" value={ value } ref="input" onChange={this.handleChange.bind(this)}/>;
9 years ago
}
}
Search.defaultProps = {
9 years ago
prefixCls: 'ant-transfer-search',
placeholder: '请输入搜索内容',
9 years ago
onChange: noop,
onDelete: noop,
};
Search.propTypes = {
9 years ago
prefixCls: PropTypes.string,
placeholder: PropTypes.string,
onChange: PropTypes.func
9 years ago
};
export default Search;