Code Monkey home page Code Monkey logo

Comments (9)

chrissainty avatar chrissainty commented on May 24, 2024

This is by design, currently you cannot enter arbitrary text into the typeahead, you must select a result from the suggestions.

In terms of the behavior of hitting tab, I've just been catching up on things and seen your conversation with @vertonghenb in #76. The standard behavior of tab is to move focus between controls not select values. I'm not trying to say you shouldn't do it, but I think your scenario is less common. I believe @vertonghenb has given you a way of achieving your goal, did that work ok?

from typeahead.

rgamage avatar rgamage commented on May 24, 2024

I understand you can't enter arbitrary text - you have to enter one of the valid entries in the list. But I've just entered a valid entry, an exact match to one of the drop-down items. Now I hit Tab, and my result is lost. Or Enter, and nothing happens. Or I arrow down, highlight a valid item, again choosing from the list, and Tab erases my work. Just seems odd to me. Definitely won't be popular with my users. For my particular application, it's meant for power users that are heavily keyboard-biased, they need a UI that helps them enter data quickly, without requiring mousing down and clicking for every data field. That's not possible with this component in its current form. "No mousy, no worky."

As for @vertonghenb 's suggested fix, I am new to Git (I'm a TFS dinosaur), so still trying to understand how I can try out his changes. It appears this is a PR on a different fork of what I cloned. Just not sure of the steps to take to get that version to my machine to test.

Thanks for all the quick feedback/discussion on this, not trying to be a pain, really want Blazor to succeed, and having great components like this work 'out of the box' easily is a big part of that.

from typeahead.

chrissainty avatar chrissainty commented on May 24, 2024

But until you actually select a entry from the list by selecting it from the suggestions and pressing enter, you have only entered arbitrary text as far as the control is concerned. We use this control at my work with great success (my team build large scale repairs and maintenance software, lots of data entry and heavy keyboard use) our users are happy with this behavior.

@vertonghenb suggestion doesn't require any changes to this library, it was a change to how you bind your value to the control.

from typeahead.

rgamage avatar rgamage commented on May 24, 2024

Ok, still not quite understanding your users' workflow - can you describe the exact sequence of keyboard strokes that allows them to enter, and select a value from the list and continue on with entering data in the form, without using the mouse? I must be missing something, sorry for my dull-headedness.

As for @vertonghenb 's changes, he presented a pull request (#77) that triggered a Select upon hitting the Enter key. That's the code I wanted to try, along with his suggestion for binding to OnValueChanged. I figured if the user can type the value they want, hit Enter (which would select the only remaining item), then my code could trigger on this selection and take some action. But without his pull request code changes to the component, hitting Enter key does nothing, even if there is only one item remaining in the list.

from typeahead.

chrissainty avatar chrissainty commented on May 24, 2024

No problem, text chat is a bit of a nightmare when trying to understand things! :)

A user would tab into the control and start typing their search term, 99% of the time they don't type in the whole phase they will just use the arrow keys to highlight the suggestion they want, hit enter and tab out. They are normally in and out in a few seconds depending on the user and the length of their search term.

My apologies, I forgot about that change. Its now merged so will go out with the next version which I want to get out sometime this week.

from typeahead.

rgamage avatar rgamage commented on May 24, 2024

Ok, that makes sense, thanks. One minor thing I noticed when replicating that workflow, Enter selects the item and hides the drop-down, but doesn't return focus to the input box. You need to then Tab once to focus on the typeahead again, and Tab again to focus on the next control (e.g. submit button). So your sequence of type chars, hit Enter, hit Tab would actually be type chars, hit Enter, hit Tab, hit Tab again. Not a big deal but would be nice if the control retained focus after hitting the Enter key.

from typeahead.

chrissainty avatar chrissainty commented on May 24, 2024

Thanks for pointing that out, I think that's a regression from our last major release. I'll get that fixed. Tracking with #81

from typeahead.

chrissainty avatar chrissainty commented on May 24, 2024

I think we're about done one this one so I'm going to close this issue as a won't fix.

from typeahead.

CenterOfGravity avatar CenterOfGravity commented on May 24, 2024

Hi. thank you
Is there a way of not clearing the input text when clicking or tabbing inside of the input element?

from typeahead.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.