Comments (9)
Thanks for reporting this @natsuo. Definitely something we need to get fixed!
from typeahead.
I think we need to establish the use cases for the footer/header templates. I can add a link to the footer template and I can click on the link without issue. Yes, the suggestion list then closes but I'm not sure why it should stay open.
@natsuo Could you clarify the type of behaviour you're after and maybe some context?
from typeahead.
This example shows header and footer templates. Footer has item count. Header has button to create a new product and a checkbox to toggle if disabled items should be shown in the list or not.
Nothing happens if you click on any whitespace area. The suggestion list disappears only if you click on a suggestion item, or outside the window.
from typeahead.
Ok, thanks for the reply. I don't think this is going to be easily resolved, I'll need to have a think. The mechanism for closing the suggestion list works by focus being lost on the underlying input control. This means we don't have to resort to JavaScript interop.
At the moment I think to get the behavior you're after we would need to do a lot more JavaScript interop, which I'd prefer to not do if we can help it. Leave it with me and I'll see what I can come up with.
from typeahead.
Maybe this is something we can easily fix with the new Blazor version (3.1 p2+)
Stop event propagation in Blazor apps
https://devblogs.microsoft.com/aspnet/asp-net-core-updates-in-net-core-3-1-preview-2/
This could also clean-up the last real interop code addKeyDownEventListener
.
from typeahead.
You might be right @vertonghenb. Do you want to have a go at this one? If not I'll code it up when I get a chance.
from typeahead.
@vertonghenb I've tried using the new prevent default directive but no joy at all. It no effect. I put a prevent default on every event and still nothing was blocked.
from typeahead.
@chrissainty Hehe, I tried the exact same thing but no luck, well it worked in the standalone example. But the validation while using it in a form messes things up.
from typeahead.
I'm doing some housekeeping. Looking back at this issue now it seems like we need to take some more aggressive steps to keep the suggestion list open after clicking on a header or footer link.
Personally, I'm not sure it's something we should look to do right now. As I mentioned before I think this would involve a lot more JS and I'm not sure of the demand for this feature. Based on all this I'm going to close this issue for now. But please reopen if anyone feels this needs more discussion/attention.
from typeahead.
Related Issues (20)
- [Question] use input-small bootstrap class and disable autocomplete
- [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
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.