Home » Php » How to handle large data in drop down with search box bootstrap

How to handle large data in drop down with search box bootstrap

Posted by: admin October 21, 2018 Leave a comment

Questions:

I have one bootstrap drop down with search text box in my web page. I am adding dynamic data into that drop down, but they are large and come from a database. That why it takes long to load. Does anyone know the solution for this problem?

<select data-live-search="true" name="paymentfacility" id="paymentfacility" data-live-search-style="startsWith" class="selectpicker">
    <?php 
    foreach($facilitiesall as $val)
    {?>
        <option value="<?php echo $val['Facility']['id']; ?>"> 
           <?php echo $val['Facility']['name']; ?>
        </option>
    <?php } ?>
</select>
Answers: