The SK.UI.Autocomplete.Dropdown class creates an Autocomplete searchbox from a select element. It extends SK.UI.Autocomplete.


Include Resource Files

  • /Shared/UIComponents/Internal/LinkInterface/Autocomplete
    • /css/fat_autocomplete.css
      <link type="text/css" rel="stylesheet" href="/Shared/UIComponents/Internal/LinkInterface/Autocomplete/css/fat_autocomplete.css">
    • /Scripts/fat_autocomplete.js
      <script type="text/javascript" src="/Shared/UIComponents/Internal/LinkInterface/Autocomplete/Scripts/fat_autocomplete.js"></script>

The dependency files may already exist in the environment and you may not need to include them.


Constructor Parameters

Name Description Type
select The select element which options will be used to populate the autocomplete list. DOM Element or ID String
options The autocomplete options. Object



These extend the SK.UI.Autocomplete options with a new one.

Name Description Type Default Value
hide_select Whether to hide the original select element. Boolean true



Name Description Parameters Returns
getSelect Returns the source select element. - DOM Element



Initializing an autocomplete searchbox from a <select> element.

<select name="dropdown" id="dropdown">
   <option value="1">Item 1</option>
   <option value="2">Item 2</option>
   <option value="3">Item 3</option>

<script type="text/javascript">
   var search = new SK.UI.Autocomplete( _$('dropdown'), {
      // options
   } )