j-DropdownList
Configuration:
required {Boolean}enables validation (default:false)datasource {String}a link to thepath {Array}or inline defined itemskey1|value1,key2 with value,key3|valuelimit {Number}a maximum count of selected items (default:0disabled)disabled {Boolean}disables componentdirplaceholder {String}placeholder forj-Directorydirsearch {Boolean}disables searching inj-Directory(default:false)check {Boolean}compares selected values with datasource (default:false)
Use it with <ui-component name="dropdownlist">. When the component is not loaded yet, jComponent downloads it on first use from the address in DEF.fallback (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.
<ui-component name="LAZY directory" config="placeholder:Search"></ui-component>
<div style="width:400px">
<ui-component name="dropdownlist" path="form.categoryid" config="datasource:datasource;required:true">Category</ui-component>
<br />
<ui-component name="dropdownlist" path="form.inlineid" config="datasource:a|A,b|B,c|C">Inline options</ui-component>
</div>
<script>
var datasource = [{ name: 'A', id: 1 }, { name: 'B', id: 2 }, { name: 'C', id: 3 }];
var form = {};
</script>