0

I need an autocomplete with a dropdown with results categorised like in HTML select - optgroup with keyboard navigation.

I tried to implement a wicket Select component with groups based on this: Separator in a Wicket DropDownChoice with a textfield for search, but can't jump to select with "Arrow down".

Any other ideas?

Community
  • 1
  • 1
ton
  • 15
  • 4

1 Answers1

2

I think you best option is Select2 (example: https://select2.github.io/examples.html#themes-templating-responsive-design) and its Wicket integration: https://github.com/wicketstuff/core/tree/master/select2-parent

martin-g
  • 17,243
  • 2
  • 23
  • 35
  • I cannot add groups to options in Wicket, and no example found. Select 2 knows only autocomplete with single/multi select. Any other solutions? – ton Apr 04 '16 at 16:58
  • To use in Wicket you can use Wicket-Extensions Select component. Demo at: http://examples7x.wicket.apache.org/compref/wicket/bookmarkable/org.apache.wicket.examples.compref.SelectPage. It should be easy to integrate it with Select2 JS widget. – martin-g Apr 05 '16 at 07:08
  • Be aware that Select2 has not traditionally been very WCAG compliant for screen readers so if that is a requirement be sure to test it. Not sure about later versions of it. – Johncl Oct 21 '20 at 12:49