fix missing code for infinite dropdown
Fixes #5323: Nested dropdown does not work for `yii\bootstrap\DropDown`