Skip to content

Commit 651cf72

Browse files
committed
Add Search clear example
1 parent d104813 commit 651cf72

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

Microsoft.Fast.sln

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".workflows", ".workflows",
3333
.github\workflows\ci-validate.yml = .github\workflows\ci-validate.yml
3434
.github\workflows\cicd_publish.yml = .github\workflows\cicd_publish.yml
3535
.github\workflows\codeql-analysis.yml = .github\workflows\codeql-analysis.yml
36-
.github\workflows\pages.yml = .github\workflows\pages.yml
3736
EndProjectSection
3837
EndProject
3938
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Fast.Templates.FluentUI", "templates\Microsoft.Fast.Templates.FluentUI.csproj", "{86B789BF-DC71-4B5F-A530-B7CDF17BD293}"

examples/FluentUI.Demo.Shared/Pages/Search/Examples/SearchInteractive.razor

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<FluentSearch @ref=searchTest @oninput=handleSearchInput Placeholder="Search for State"></FluentSearch>
1+
<FluentSearch @ref=searchTest @oninput=handleSearchInput @onchange=handleClear Placeholder="Search for State"></FluentSearch>
22
<br />
33
<FluentListbox Options=@searchResults />
44

@@ -82,4 +82,12 @@
8282
}
8383
}
8484
}
85+
86+
void handleClear(ChangeEventArgs args)
87+
{
88+
if (args is not null)
89+
{
90+
searchResults = defaultResults();
91+
}
92+
}
8593
}

0 commit comments

Comments
 (0)