mirror of https://github.com/zulip/zulip.git
Support helpOnEmptyStrings option in typeahead.
It allows us to provide suggestions when the user types '' in a searchbox (e.g. by hitting delete when text is selected). (imported from commit dc27ef86db2b6ec40039e4e9668b8ccc288c6134)
This commit is contained in:
parent
72f65070f3
commit
d329317502
|
@ -1889,8 +1889,10 @@
|
|||
|
||||
this.query = this.$element.val()
|
||||
|
||||
if (!this.query || this.query.length < this.options.minLength) {
|
||||
return this.shown ? this.hide() : this
|
||||
if (!this.options.helpOnEmptyStrings) {
|
||||
if (!this.query || this.query.length < this.options.minLength) {
|
||||
return this.shown ? this.hide() : this
|
||||
}
|
||||
}
|
||||
|
||||
items = $.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)) : this.source
|
||||
|
|
Loading…
Reference in New Issue