How to reset selected value in yii2 widget select2 using jQuery or JavaScript? I've tried to use $("#select2id").val("").trigger("change");
and it show the placeholder, but the first item is always automatically selected.
EDIT: I'm using this widget for make dependency dropdown. the widget that the first item always automatically selected is the dependent widget.
I've solved the problem. That code is actually working. The order of the code that make the problem. So, be sure to check the code order.