-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9547324
commit 2506486
Showing
3 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
@page | ||
@model WinCCOAOutsideInfoRepo.Pages.SearchPageModel | ||
@{ | ||
ViewData["Title"] = "Search"; | ||
} | ||
|
||
<form method="get" action="/search-results"> | ||
<input type="text" name="query" placeholder="Search..." /> | ||
<button type="submit">Search</button> | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.AspNetCore.Mvc.RazorPages; | ||
|
||
namespace WinCCOAOutsideInfoRepo.Pages | ||
{ | ||
public class SearchPageModel : PageModel | ||
{ | ||
public void OnGet() | ||
{ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<h3>SearchBarComponent</h3> | ||
|
||
@code { | ||
[Parameter] public EventCallback<string> OnSearch { get; set; } | ||
|
||
private string searchText; | ||
|
||
private void TriggerSearch() | ||
{ | ||
OnSearch.InvokeAsync(searchText); | ||
} | ||
} | ||
|
||
<form @onsubmit="TriggerSearch" role="search"> | ||
<input type="text" @bind="searchText" placeholder="Searching" /> | ||
<button type="submit">Search</button> | ||
</form> |