From ce8bc9be59ae29fe4bfd33e9ff3a06623112afcc Mon Sep 17 00:00:00 2001 From: Damien LEROY Date: Tue, 9 May 2023 00:25:26 +0200 Subject: [PATCH] Adding autocomplete --- Pages/Tester.razor | 46 ++++++++++++++++++----- Pages/Tester.razor.cs | 16 +++++++- Pages/_Host.cshtml | 1 + wwwroot/css/autocomplete/autocomplete.css | 41 ++++++++++++++++++++ wwwroot/js/autocomplete/autocomplete.js | 1 + 5 files changed, 93 insertions(+), 12 deletions(-) create mode 100644 wwwroot/css/autocomplete/autocomplete.css create mode 100644 wwwroot/js/autocomplete/autocomplete.js diff --git a/Pages/Tester.razor b/Pages/Tester.razor index 5476869..d6e5de8 100644 --- a/Pages/Tester.razor +++ b/Pages/Tester.razor @@ -36,8 +36,26 @@
-
- +
+ + @if (_filteredTopics is not null) + { +
    + @if (_filteredTopics.Any()) + { + @foreach (var topic in _filteredTopics) + { +
  • SelectionTopic(topic))> + @topic +
  • + } + } + else + { +
  • No results
  • + } +
+ }
@@ -325,20 +343,28 @@ else