danielfarrell / bootstrap-combobox

A combobox plugin that works with twitter bootstrap
849 stars 328 forks source link

Bugfix to make option appendId work #246

Closed martin-pabst closed 6 years ago

martin-pabst commented 7 years ago

this.options.appendId !== "undefined" always returns true. We want to test if option appendId is set, so better replace it with typeof this.options.appendId !== "undefined"

lipetravis commented 6 years ago

I also ran into this issue and implemented a similar fix. Except mine assigns the source's ID in either case. It only appends to the ID if an appendID is present.

this.$element.attr('id', typeof this.options.appendId !== "undefined" ? this.$source.attr('id') + this.options.appendId : this.$source.attr('id'));

nickrivadeneira commented 6 years ago

Related to #213

tiesont commented 6 years ago

Closing in favor of #213