0

Autocomplete functionality of combobox

asked 2016-03-28 18:25:50 +0800

avanish240288 gravatar image avanish240288
11

updated 2016-03-30 09:51:32 +0800

the item is getting selected, but the combo is not scrolling to the specific item on typing the item. My requirement is to have auto complete feature with autodrop and the dropdown box should scroll to the item.

For example - On first time load if I type 'Item 149' then it is highlighted but list not scrolled to the specific position. End-user should see the highlighted item.

Similarly - when item 149 is already the selected item, and if I erase and enter 'item 1' the list should scroll back to top showing item 1 selected. (Couldn't attach image as I don't have enough points)

We are using ZK 7 version and IE 11 /Crome Version 49.0.2623.87 m

Please let me know how this can be achieved.

delete flag offensive retag edit

Comments

i slightly increased your karma so you can post links as text, e.g. to a runnable example on http://zkfiddle.org/, a screenshot usually doesn't help identifying a problem only requiring a sequence of inputs.

cor3000 ( 2019-08-07 09:53:31 +0800 )edit

besides that, my condolences for still having to use chrome 49 in 2019 (for XP/vista support?) That will make is so much harder for anyone trying to help. but you're lucky the problem isn't specific to that version.

cor3000 ( 2019-08-07 09:56:16 +0800 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-03-30 11:41:12 +0800

Darksu gravatar image Darksu
1991 1 4

Hello avanish240288,

You could use: Clients.scrollIntoView();

As a parameter set the selected item of the combobox when the event is triggered.

Best Regards,

Darksu

link publish delete flag offensive edit
0

answered 2019-08-07 02:31:30 +0800

vince1101 gravatar image vince1101
31

but the selected item of the combobox is not set until actually selected, the scroll keeps going to the old value of the combobox and not the currently suggested value while typing if using the getSelectedItem()... do you have another property of the combobox that would return the currently suggested item of the list ?

link publish delete flag offensive edit

Comments

now it's 3 years after the initial question ... do you still have the exact same problem? can you provide a runnable example and explain the exact steps to reproduce the problem on http://zkfiddle.org/? (I increased your karma so you can paste a link)

cor3000 ( 2019-08-07 10:00:11 +0800 )edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2016-03-28 18:25:50 +0800

Seen: 26 times

Last updated: Aug 07

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More