If you click the reset button in the form, the selected item in select2 will not be reset

If you click the reset button in the form, the selected item in select2 will not be reset. The solution is provided below. 

Enter a picture description


As shown in the figure, after clicking the reset button, the value is reset to the initial state, while select2 still selects the previous option.

Solution


Add the following code in line 625 of the ry-ui.js file

$("#" + currentId).find('select').val('').trigger('change');

Enter a picture description

Guess you like

Origin blog.csdn.net/qq_19309473/article/details/132140626
Recommended