mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 06:25:45 +01:00
Fix on submit handler
This commit is contained in:
@@ -51,19 +51,16 @@ class Page extends React.Component<Props, State> {
|
|||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = { value: "" };
|
this.state = { value: "" };
|
||||||
|
|
||||||
this.handleChange = this.handleChange.bind(this);
|
|
||||||
this.handleSubmit = this.handleSubmit.bind(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
handleChange(event) {
|
handleChange = event => {
|
||||||
this.setState({ value: event.target.value });
|
this.setState({ value: event.target.value });
|
||||||
}
|
};
|
||||||
|
|
||||||
handleSubmit(event) {
|
handleSubmit = event => {
|
||||||
this.props.filter(this.state.value);
|
this.props.filter(this.state.value);
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { error } = this.props;
|
const { error } = this.props;
|
||||||
@@ -94,11 +91,11 @@ class Page extends React.Component<Props, State> {
|
|||||||
"column is-three-fifths is-mobile-action-spacing"
|
"column is-three-fifths is-mobile-action-spacing"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<form className={classNames(classes.inputField, "input-field")}>
|
<form
|
||||||
<div
|
className={classNames(classes.inputField, "input-field")}
|
||||||
className="control has-icons-left"
|
onSubmit={this.handleSubmit}
|
||||||
onSubmit={this.handleSubmit}
|
>
|
||||||
>
|
<div className="control has-icons-left">
|
||||||
<input
|
<input
|
||||||
className={classNames(classes.inputHeight, "input")}
|
className={classNames(classes.inputHeight, "input")}
|
||||||
type="search"
|
type="search"
|
||||||
|
|||||||
Reference in New Issue
Block a user