import React from "react"; // Inline search bar with direct UUID linking, // Changes URL and populates the form at /migrations/ with the information from the request class InLineSearch extends React.Component { constructor(props) { super(props); this.state = { data: "" }; this.onChange = this.onChange.bind(this); } onChange(e) { this.setState({ data: e.target.value }); } onKeyPressed = (e) => { // This is so we can access the state within the function if (e.keyCode === 13) { window.location.href = "https://devui.benjamyn.love/migrations/" + this.state.data; } }; render() { return ( ); } } export default InLineSearch;