Skip to content
This repository has been archived by the owner on Dec 7, 2021. It is now read-only.

Commit

Permalink
Merge pull request #136 from trailsnail/trailsnail-patch-1
Browse files Browse the repository at this point in the history
Prevent deleting optgroups on open() in mobile viewport
  • Loading branch information
Mobius1 committed Oct 13, 2019
2 parents 6c6d900 + 2a19ba8 commit af4a905
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/selectr.js
Expand Up @@ -2095,7 +2095,7 @@
if (this.mobileDevice || this.config.nativeDropdown) {
util.addClass(this.container, "native-open");

if (this.config.data) {
if (this.config.data && this.el.options.length === 0) {
// Dump the options into the select
// otherwise the native dropdown will be empty
util.each(this.options, function(i, option) {
Expand Down

0 comments on commit af4a905

Please sign in to comment.