{"id":19101241,"url":"https://github.com/loresoft/LoreSoft.Blazor.Controls","last_synced_at":"2025-04-18T18:32:16.515Z","repository":{"id":35129485,"uuid":"200741357","full_name":"loresoft/LoreSoft.Blazor.Controls","owner":"loresoft","description":"Blazor Controls","archived":false,"fork":false,"pushed_at":"2024-05-20T22:07:45.000Z","size":14625,"stargazers_count":121,"open_issues_count":16,"forks_count":25,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-05-21T22:19:38.244Z","etag":null,"topics":["blazor","blazor-controls","blazor-server","blazor-webassembly","data-grid","date-picker","datetimepicker","typeahead"],"latest_commit_sha":null,"homepage":"https://blazor.loresoft.com/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/loresoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-05T23:13:43.000Z","updated_at":"2024-08-18T20:40:24.046Z","dependencies_parsed_at":"2023-01-15T14:25:26.521Z","dependency_job_id":"ac09a3f8-220f-4e9a-9771-e24792b4c657","html_url":"https://github.com/loresoft/LoreSoft.Blazor.Controls","commit_stats":null,"previous_names":[],"tags_count":46,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loresoft%2FLoreSoft.Blazor.Controls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loresoft%2FLoreSoft.Blazor.Controls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loresoft%2FLoreSoft.Blazor.Controls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loresoft%2FLoreSoft.Blazor.Controls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loresoft","download_url":"https://codeload.github.com/loresoft/LoreSoft.Blazor.Controls/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223783095,"owners_count":17201906,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blazor","blazor-controls","blazor-server","blazor-webassembly","data-grid","date-picker","datetimepicker","typeahead"],"created_at":"2024-11-09T03:53:13.225Z","updated_at":"2025-04-18T18:32:16.509Z","avatar_url":"https://github.com/loresoft.png","language":"C#","readme":"## Overview\n\nThe LoreSoft Blazor Controls project contains a collection of Blazor user controls.\n\n* Demo: [https://blazor.loresoft.com/](https://blazor.loresoft.com/ \"LoreSoft Blazor Controls\")\n* NuGet: [https://nuget.org/packages/LoreSoft.Blazor.Controls](https://nuget.org/packages/LoreSoft.Blazor.Controls \"NuGet Package\")\n* Source: [https://github.com/loresoft/LoreSoft.Blazor.Controls](https://github.com/loresoft/LoreSoft.Blazor.Controls \"Project Source\")\n\n## Installing\n\nThe LoreSoft.Blazor.Controls library is available on nuget.org via package name `LoreSoft.Blazor.Controls`.\n\nTo install LoreSoft.Blazor.Controls, run the following command in the Package Manager Console\n\n```shell\nInstall-Package LoreSoft.Blazor.Controls\n```\n\n## Setup\n\nTo use, you need to include the following CSS and JS files in your `index.html` (Blazor WebAssembly) or `_Host.cshtml` (Blazor Server).\n\nIn the head tag add the following CSS.\n\n```html\n\u003clink rel=\"stylesheet\" href=\"_content/LoreSoft.Blazor.Controls/BlazorControls.css\" /\u003e\n```\n\n\n## Typeahead Features\n\n* Searching data by supplying a search function\n* Template for search result, selected value, and footer\n* Debounce support for smoother search\n* Character limit before searching\n* Multiselect support\n* Built in form validation support\n\n## Typeahead Properties\n\n### Required\n\n* **Value** - Bind to `Value` in single selection mode.  Mutually exclusive to `Values` property.\n* **Values** - Bind to `Values` in multiple selection mode.  Mutually exclusive to `Value` property.\n* **SearchMethod** - The method used to return search result\n\n### Optional\n\n* **AllowClear** - Allow the selected value to be cleared\n* **ConvertMethod** - The method used to convert search result type to the value type\n* **Debounce** - Time to wait, in milliseconds, after last key press before starting a search\n* **Items** - The initial list of items to show when there isn't any search text\n* **MinimumLength** - Minimum number of characters before starting a search\n* **Placeholder** - The placeholder text to show when nothing is selected\n\n### Templates\n\n* **ResultTemplate** - User defined template for displaying a result in the results list\n* **SelectedTemplate** - User defined template for displaying the selected item(s)\n* **NoRecordsTemplate** - Template for when no items are found\n* **FooterTemplate** - Template displayed at the end of the results list\n* **LoadingTemplate** - Template displayed while searching\n\n## Typeahead Examples\n\n### Basic Example\n\nState selection dropdown.  Bind to `Value` property for single selection mode.\n\n```html\n\u003cTypeahead SearchMethod=\"@SearchState\"\n           Items=\"Data.StateList\"\n           @bind-Value=\"@SelectedState\"\n           Placeholder=\"State\"\u003e\n    \u003cSelectedTemplate Context=\"state\"\u003e\n        @state.Name\n    \u003c/SelectedTemplate\u003e\n    \u003cResultTemplate Context=\"state\"\u003e\n        @state.Name\n    \u003c/ResultTemplate\u003e\n\u003c/Typeahead\u003e\n```\n\n```csharp\n@code {\n    public StateLocation SelectedState { get; set; }\n\n    public Task\u003cIEnumerable\u003cStateLocation\u003e\u003e SearchState(string searchText)\n    {\n        var result = Data.StateList\n            .Where(x =\u003e x.Name.ToLower().Contains(searchText.ToLower()))\n            .ToList();\n\n        return Task.FromResult\u003cIEnumerable\u003cStateLocation\u003e\u003e(result);\n    }\n}\n```\n\n### Multiselect Example\n\nWhen you want to be able to select multiple results.  Bind to the `Values` property.  The target property must be type `IList\u003cT\u003e`.\n\n```html\n\u003cTypeahead SearchMethod=\"@SearchPeople\"\n           Items=\"Data.PersonList\"\n           @bind-Values=\"@SelectedPeople\"\n           Placeholder=\"Owners\"\u003e\n    \u003cSelectedTemplate Context=\"person\"\u003e\n        @person.FullName\n    \u003c/SelectedTemplate\u003e\n    \u003cResultTemplate Context=\"person\"\u003e\n        @person.FullName\n    \u003c/ResultTemplate\u003e\n\u003c/Typeahead\u003e\n```\n\n```csharp\n@code {\n    public IList\u003cPerson\u003e SelectedPeople;\n\n    public Task\u003cIEnumerable\u003cPerson\u003e\u003e SearchPeople(string searchText)\n    {\n        var result = Data.PersonList\n            .Where(x =\u003e x.FullName.ToLower().Contains(searchText.ToLower()))\n            .ToList();\n\n        return Task.FromResult\u003cIEnumerable\u003cPerson\u003e\u003e(result);\n    }\n }\n ```\n\n### GitHub Repository Search\n\nUse Octokit to search for a GitHub repository.\n\n```html\n\u003cTypeahead SearchMethod=\"@SearchGithub\"\n           @bind-Value=\"@SelectedRepository\"\n           Placeholder=\"Repository\"\n           MinimumLength=\"3\"\u003e\n    \u003cSelectedTemplate Context=\"repo\"\u003e\n        @repo.FullName\n    \u003c/SelectedTemplate\u003e\n    \u003cResultTemplate Context=\"repo\"\u003e\n        \u003cdiv class=\"github-repository clearfix\"\u003e\n            \u003cdiv class=\"github-avatar\"\u003e\u003cimg src=\"@repo.Owner.AvatarUrl\"\u003e\u003c/div\u003e\n            \u003cdiv class=\"github-meta\"\u003e\n                \u003cdiv class=\"github-title\"\u003e@repo.FullName\u003c/div\u003e\n                \u003cdiv class=\"github-description\"\u003e@repo.Description\u003c/div\u003e\n                \u003cdiv class=\"github-statistics\"\u003e\n                    \u003cdiv class=\"github-forks\"\u003e\u003ci class=\"fa fa-flash\"\u003e\u003c/i\u003e @repo.ForksCount Forks\u003c/div\u003e\n                    \u003cdiv class=\"github-stargazers\"\u003e\u003ci class=\"fa fa-star\"\u003e\u003c/i\u003e @repo.StargazersCount Stars\u003c/div\u003e\n                    \u003cdiv class=\"github-watchers\"\u003e\u003ci class=\"fa fa-eye\"\u003e\u003c/i\u003e @repo.SubscribersCount Watchers\u003c/div\u003e\n                \u003c/div\u003e\n            \u003c/div\u003e\n        \u003c/div\u003e\n    \u003c/ResultTemplate\u003e\n\u003c/Typeahead\u003e\n```\n\n```csharp\n@inject IGitHubClient GitHubClient;\n\n@code {\n    public Repository SelectedRepository { get; set; }\n\n    public async Task\u003cIEnumerable\u003cRepository\u003e\u003e SearchGithub(string searchText)\n    {\n        var request = new SearchRepositoriesRequest(searchText);\n        var result = await GitHubClient.Search.SearchRepo(request);\n\n        return result.Items;\n    }\n}\n```\n","funding_links":[],"categories":["others"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floresoft%2FLoreSoft.Blazor.Controls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floresoft%2FLoreSoft.Blazor.Controls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floresoft%2FLoreSoft.Blazor.Controls/lists"}