import React, { PureComponent } from 'react'; import { TemplateQueryProps } from 'app/types/plugins'; export default class DefaultTemplateQueryComponent extends PureComponent { constructor(props) { super(props); this.state = { value: props.query }; this.handleChange = this.handleChange.bind(this); this.handleBlur = this.handleBlur.bind(this); } handleChange(event) { this.setState({ value: event.target.value }); } handleBlur(event) { this.props.onChange(event.target.value); } render() { return (
Query
); } }