Create units view each time list param is changed

Hi,

I want to created a units view where user can choose which users to show. So there is a list of all users on the scheduler page. When the user checks on one of them I want only that user show in the units view. So this means i destroy the units tab already existing and create and new one.

scheduler.createUnitsView({
        name: "unit",
        property: "ProviderID",
        list: providersList
    });

So from above code whenever providersList changes i want to create units view.

Each time, when options list changed, you can call the next code, it will update existing unit view.

scheduler._props.unit.list = providersList;
scheduler.callEvent("onOptionsLoad",[]);