Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Rendering other select based on checkbox event

dipeshshah free asked 5 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();            
    }

Piotr Glejzer staff commented 5 years ago

Did you try to use buildMaterialOptions method or buildSingleOption method to do this?


dipeshshah free commented 5 years ago

No, let me try. Do we have any documentation for such methods?


Piotr Glejzer staff commented 5 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.



Please insert min. 20 characters.

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