PDA

View Full Version : [DEFER-1067]The type-ahead feature of fields is unnecessarily restrictive



banderson
14 Jun 2010, 10:50 AM
This has been reported at least three times that I can find:

http://www.extjs.com/forum/showthrea...ight=typeAhead (http://www.extjs.com/forum/showthread.php?38700-Typeahead-combo-box-and-tab-selection-does-not-work&highlight=typeAhead)

http://www.extjs.com/forum/showthrea...ight=typeAhead (http://www.extjs.com/forum/showthread.php?74053-Combobox-with-typeahead-false&highlight=typeAhead)

http://www.extjs.com/forum/showthread.php?66721-combo-typeAhead-working-on-blur!&highlight=typeAhead (http://www.extjs.com/forum/showthread.php?66721-combo-typeAhead-working-on-blur%21&highlight=typeAhead)

The third link says it's working this way by design. If so, the design is wrong.

Whether typeAhead is false or true, it should not force selection if a user tabs away unless they have forceSelection=true set.

Maybe I'm missing something simple here, if so, please let me know and I'll fix it and update those other unresolved threads too.

Thanks.


...yes, this is a copy/paste from my 2.0 bug report which was never resolved:

http://www.extjs.com/forum/showthread.php?98645-typeAhead-behaving-wrong&p=465148#post465148

evant
16 Jun 2010, 3:23 AM
I'd disagree. I think it's a much more common use case that tabbing out of the field should select the active item in the list. Just because it doesn't work exactly as you think it should doesn't always make it a bug.

I'm open to discussion, but so far I'm not convinced.

banderson
16 Jun 2010, 7:11 AM
I'd disagree. I think it's a much more common use case that tabbing out of the field should select the active item in the list. Just because it doesn't work exactly as you think it should doesn't always make it a bug.

I'm open to discussion, but so far I'm not convinced.

I think you're right that people commonly will like it the way it is...but that doesn't override the concern that you are making it completely impossible for a user to enter certain values in text fields. No matter how common the other use-case is, a type-ahead feature should never be in charge of what values can or cannot be entered in a text field.

There is already a "forceSelection" parameter that can be set. If forceSelection is set to false, why would the field force selection just because typeAhead is true? That doesn't make any sense.

In my scenario, we use a field to allow users to create categories. Often these categories are reused, but the field is still free-form so the user can enter anything they want. If one user creates a category called "Users and Groups", then the typeAhead feature completely forbids a subsequent user from ever creating a category called "Users"...if they simply type "Users" into the field then delete the typeAhead text then tab away, the typeAhead text is still forced into the field. This functionality should be controlled by forceSelection, not by typeAhead.

banderson
21 Jun 2010, 8:10 AM
bump. Still hoping for further discussion on this.

Jamie Avins
21 Jun 2010, 10:16 AM
I think we can accommodate this better in 4.x as changing it in the last minor release for 3.x doesn't seem to make much sense.