mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-08-04 21:39:04 +00:00
reconstruct map local
This commit is contained in:
39
web/build/filter.js
Normal file
39
web/build/filter.js
Normal file
@@ -0,0 +1,39 @@
|
||||
function init(React){
|
||||
|
||||
var Filter = React.createClass({displayName: "Filter",
|
||||
|
||||
dealChange:function(){
|
||||
var self = this,
|
||||
userInput = React.findDOMNode(self.refs.keywordInput).value;
|
||||
|
||||
self.props.onChangeKeyword && self.props.onChangeKeyword.call(null,userInput);
|
||||
},
|
||||
setFocus:function(){
|
||||
var self = this;
|
||||
React.findDOMNode(self.refs.keywordInput).focus();
|
||||
},
|
||||
componentDidUpdate:function(){
|
||||
this.setFocus();
|
||||
},
|
||||
render:function(){
|
||||
var self = this;
|
||||
|
||||
return (
|
||||
React.createElement("div", {className: "filterSection"},
|
||||
React.createElement("h4", {className: "subTitle"}, "Log Filter"),
|
||||
|
||||
React.createElement("form", {className: "uk-form"},
|
||||
React.createElement("input", {className: "uk-form-large", ref: "keywordInput", onChange: self.dealChange, type: "text", placeholder: "type keywords or /^regExp$/", width: "300"})
|
||||
)
|
||||
)
|
||||
);
|
||||
},
|
||||
componentDidMount:function(){
|
||||
this.setFocus();
|
||||
}
|
||||
});
|
||||
|
||||
return Filter;
|
||||
}
|
||||
|
||||
module.exports.init = init;
|
||||
Reference in New Issue
Block a user