UNPKG

oda-framework

Version:

It's an ES Progressive Framework based on the technology of Web Components and designed especially for creating custom UI/UX of any complexity for web and cross-platform PWA mobile applications.

26 lines (25 loc) 1.03 kB
<meta charset="utf-8"> <!-- <oda-tester> --> <oda-combo-box fadein id="box" placeholder="search..."></oda-combo-box> <!-- </oda-tester> --> <script type="module"> import '../../../oda.js'; import '../../../tools/styles/styles.js'; import './combo-box.js'; const el = ODA.createElement('oda-combo-list', { items: [ { label: 'label 1' }, { label: 'label 2' }, { label: 'label 3' }, { label: 'label 4' }, { label: 'label 5' }, { label: 'label 2' }, { label: 'label 3' }, { label: 'label 4' }, { label: 'label 5' }, { label: 'label 3' }, { label: 'label 4' }, { label: 'label 5' }, { label: 'label 4' }, { label: 'label 5' }, { label: 'label 5' } ] }); setTimeout(() => { box.dropDownControl = el; box.value = el.items[Math.floor(getRandomArbitrary(0, el.items.length))]; }, 10) function getRandomArbitrary(min, max) { return Math.random() * (max - min) + min; } </script>