DepDrop dependent field not updating on Reset Button

I am using Dependent Dropdown extension which is working fine on parent field ‘service_type’ and child field ‘addon_id’ as shown below. But I am having a small issue while resetting.

Suppose I have selected a value ‘Service 1’ and based on that the child dropdown populates with ‘Addon 1’ and ‘Addon 2’, then I select ‘Addon 2’ but then I click the reset button, which resets the value of parent field to ‘Select’ which is fine and the child field to ‘Select’ as well but it still shows the dropdown options of ‘Addon 1’ and ‘Addon 2’ whereas the child field should not have any options in dropdown.


echo $form->field($model, 'service_type')->dropDownList($dropMenu, ['id'=>'cat-id', 'prompt'=>'Select'])->label('Service Name');


echo $form->field($model, 'addon_id')->widget(DepDrop::classname(), [

    'options'=>['id'=>'subcat-id','value'=>$model->addon_id],

    'pluginOptions'=>[

    	'initialize'=>true,

        'depends'=>['cat-id'],        

        'placeholder'=>'Select...',

        'url'=>Url::to(["/customer/get-addons-by-type"]),

    	'loadingText' => 'Loading Addons ...',    	

    ]

])->label('Addon Name');


echo Html::resetButton('Clear', ['class' => 'btn btn-flat btn-primary ink-reaction', 'id' => 'resetButton']) ;