소스 검색

Merge pull request #1940 from datapad/reset-filtered-dropdown

Fix dropdown items not being reset after filtering and selecting when `closeOnSelect` is `false`
Igor Vaynberg 11 년 전
부모
커밋
816a46bf1a
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  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) {