Browse Source

Fix dropdown items not being reset after filtering and selecting when closeOnSelect is false

Alek Storm 11 năm trước cách đây
mục cha
commit
b5aa4688ea
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      select2.js

+ 3 - 0
select2.js

@@ -2786,6 +2786,9 @@ the specific language governing permissions and limitations under the Apache Lic
 
             this.opts.element.trigger({ type: "selected", val: this.id(data), choice: data });
 
+            this.clearSearch();
+            this.updateResults();
+
             if (this.select || !this.opts.closeOnSelect) this.postprocessResults(data, false, this.opts.closeOnSelect===true);
 
             if (this.opts.closeOnSelect) {