There are few options on how to include/import Virtual Select into your project.
Install the Virtual Select Js library from command prompt from the root directory of the project:
npm install virtual-select-plugin --save
Import the Virtual Select package.
import "virtual-select-plugin/dist/virtual-select";
Below the example how to use the package and make it working Virtual Select on any page.
PHP
<div class="card-body"> <div id="sampleSelect"></div> </div>
JavaScript
import "virtual-select-plugin/dist/virtual-select"; function getOptions(count = 10, includeDesc = false) { const optionsData = []; for (let i = 1; i <= count; i += 1) { const optionData = { value: i, label: `Option ${i}` }; if (includeDesc) optionData.description = `Description ${i}`; optionsData.push(optionData); } return optionsData; } // Default select VirtualSelect.init({ ele: "#sampleSelect", options: getOptions(3), });
Be the first to know about new updates and exclusive discounts. No spam, just great offers!
How about
With over 7 years of experienced team, we specialize in delivering custom projects for startups, blue-chip companies, and government agencies. We have successfully completed over 250+ projects, providing tailored solutions that meet the unique needs of each client.
Hire Us© Domiex Created & Crafted by SRBThemes.