Basic
Getting Started
You can install modal as part of base.extensions
npm install @blexar/extensions
# or using yarn
yarn add @blexar/extensionsIf you want the standalone version
npm install @blexar/select
# or using yarn
yarn add @blexar/selectInclude necessary files
<head>
<!-- if you use Base.framework -->
<link rel="stylesheet" href="dist/css/base.css">
</head>
<body>
<select name="" id="select-1" >
<optgroup label="group-1">
<option value="value-1">option-1</option>
<option value="value-2">option-2</option>
</optgroup>
<optgroup label="group-2">
<option value="value-3">option-3</option>
<option value="value-4">option-4</option>
</optgroup>
</select>
<!-- include javaScript file -->
<script type="text/javascript" src="dist/js/select.js"></script>
<script>
const newSelect1 = new Select('#select-1');
</script>
</body>For styling options please seeSelect component.
API
| Properties | Default | Description |
|---|---|---|
| data | null | generate the options values |
| multiple | false | enable/disable multiple mode |
| Method | Argument | Description |
|---|---|---|
| menuShow | show select options menu | |
| menuHide | hide select options menu | |
| menuToggle | toggle options menu visibility | |
| selectOption | [Object] option | select option |
| updateLabels | (in multiple mode only) update the labels |