Topic: Rendering other select based on checkbox event
                  
                  dipeshshah
                  free
                  asked 6 years ago
                
We are trying to re-generate select based on other checkbox event, but when we select multiple checkbox (more than 4) it becomes slow.
Below is the code for reference
function setDdlDefaultStore(){
        $('#ddlDefaultStore').find('option:enabled').remove();
        $('#ddlStores').closest('div.row').find('li').each(function(){             
            if($(this).hasClass('active')){
                $('#ddlDefaultStore').append('<option>'+$(this).find('span').text()+'</option>');
            }
        });
        $('#ddlDefaultStore').materialSelect();            
    }
                
                  FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
              Opened
Specification of the issue
              - ForumUser: Free
 - Premium support: No
 - Technology: MDB jQuery
 - MDB Version: 4.7.7
 - Device: Computer
 - Browser: chrome
 - OS: windows
 - Provided sample code: No
 - Provided link: No
 
Piotr Glejzer staff commented 6 years ago
Did you try to use buildMaterialOptions method or buildSingleOption method to do this?
dipeshshah free commented 6 years ago
No, let me try. Do we have any documentation for such methods?
Piotr Glejzer staff commented 6 years ago
we don't have any documentation for this :( you have to find this in material-select.js file and do it for your own what you want.