Skip to content

Commit 816a46b

Browse files
committed
Merge pull request select2#1940 from datapad/reset-filtered-dropdown
Fix dropdown items not being reset after filtering and selecting when `closeOnSelect` is `false`
2 parents c0f37ea + b5aa468 commit 816a46b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

select2.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2786,6 +2786,9 @@ the specific language governing permissions and limitations under the Apache Lic
27862786

27872787
this.opts.element.trigger({ type: "selected", val: this.id(data), choice: data });
27882788

2789+
this.clearSearch();
2790+
this.updateResults();
2791+
27892792
if (this.select || !this.opts.closeOnSelect) this.postprocessResults(data, false, this.opts.closeOnSelect===true);
27902793

27912794
if (this.opts.closeOnSelect) {

0 commit comments

Comments
 (0)