Skip to content

Commit

Permalink
Add Search clear example
Browse files Browse the repository at this point in the history
  • Loading branch information
vnbaaij committed Sep 12, 2022
1 parent d104813 commit 651cf72
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 0 additions & 1 deletion Microsoft.Fast.sln
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".workflows", ".workflows",
.github\workflows\ci-validate.yml = .github\workflows\ci-validate.yml
.github\workflows\cicd_publish.yml = .github\workflows\cicd_publish.yml
.github\workflows\codeql-analysis.yml = .github\workflows\codeql-analysis.yml
.github\workflows\pages.yml = .github\workflows\pages.yml
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Fast.Templates.FluentUI", "templates\Microsoft.Fast.Templates.FluentUI.csproj", "{86B789BF-DC71-4B5F-A530-B7CDF17BD293}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<FluentSearch @ref=searchTest @oninput=handleSearchInput Placeholder="Search for State"></FluentSearch>
<FluentSearch @ref=searchTest @oninput=handleSearchInput @onchange=handleClear Placeholder="Search for State"></FluentSearch>
<br />
<FluentListbox Options=@searchResults />

Expand Down Expand Up @@ -82,4 +82,12 @@
}
}
}

void handleClear(ChangeEventArgs args)
{
if (args is not null)
{
searchResults = defaultResults();
}
}
}

0 comments on commit 651cf72

Please sign in to comment.