diff --git a/server/ui/src/components/navbar.tsx b/server/ui/src/components/navbar.tsx index 0a260a4..38e3200 100644 --- a/server/ui/src/components/navbar.tsx +++ b/server/ui/src/components/navbar.tsx @@ -18,6 +18,7 @@ export class Navbar extends Component { constructor(props, context) { super(props, context); + this.fillSearchField(); } render() { @@ -72,4 +73,13 @@ export class Navbar extends Component { } i.setState({ searchParams: searchParams }); } + + fillSearchField() { + let splitPath: Array = this.context.router.route.location.pathname.split("/"); + if (splitPath.length == 4 && splitPath[1] == 'search') + this.state.searchParams = { + page: Number(splitPath[3]), + q: splitPath[2] + }; + } }