Comments (6)
It looks like the way to do this is to instantiate an instance of the typeahead, reference it in the markup declaration via the @ref attribute, and then call a method on the component when needed.
from typeahead.
You could do this with some JS and using the .css class of the control.
However @chrissainty and myself have been thinking to create a Blazored.Essentials package so you could express this easier for example:
<BlazoredTypeahead SearchMethod="GetPeopleLocal"
@ref="myTypeahead"
@bind-Value="SelectedPerson"
ShowDropDownOnFocus="true"
placeholder="Search by first name...">
<SelectedTemplate Context="person">
@person.Firstname
</SelectedTemplate>
<ResultTemplate Context="person">
@person.Firstname @person.Lastname
</ResultTemplate>
</BlazoredTypeahead>
@code {
ElementReference myTypeahead;
protected override void OnInitialized()
{
myTypeahead.Focus();
}
}
@chrissainty
Maybe we should go ahead and start on this Blazored.Essentials
or Blazored.Foundation
or Blazored.Core
or ... package?, if you provide a repo I can start laying the foundation.
from typeahead.
I'd be interested in pitching in if you want the help :)
from typeahead.
@vertonghenb Yes - we should make a move on that project. Blazored.Essentials seems like a good name. I'll get the repo created.
@Joe-LaRue The more the merrier, I'll get the repo setup then we can get some issues going
from typeahead.
I am I right in thinking this issue can be closed now @Joe-LaRue ?
from typeahead.
Yea - it sounds like the plan is to handle it via Blazored.Essentials.
from typeahead.
Related Issues (20)
- [Question] Is there a way to programmatically select multiple items? HOT 1
- [Bug] When used in a child component in multiselect mode items not added when selected HOT 1
- Have a OnClose Option for the Dropdown list
- [Question] Are you able to just use strings for Value and date related bindings on the control?
- Two way binding
- Typeahead search text dissapearing from search box after displaying results in v 4.7.0 HOT 14
- [Feature Request] Option to disable deleting items with "Backspace" when using MultiSelect
- Method to Force results dropdown to close?
- how to Enable mutli line
- Laptop touchpad not selecting item in results
- Error in "Using complex types but only binding to a single property" HOT 1
- [Bug] - blazored-typeahead results hides behind the modal-footer
- [Bug] Typeahead inside Blazored.Modal search text erase with .NET 7.0 HOT 3
- [Question] How to Justify Dropdown Content
- [Bug] ArgumentNullException after pressing 'backspace' key
- Clicking typeahead inside MudTable in <MudTd> by MudBlazor not set to Focus
- [Bug] Multiple Pasting of text into the control causes app pool to crash
- WORK PAUSED - PLEASE READ BEFORE POSTING AN ISSUE HOT 1
- how to set category id for Searchmethod HOT 1
- Scroll in dropdown menu
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typeahead.