Updating search in menu component
This commit is contained in:
parent
b9c5b2b014
commit
4d87c6d817
|
@ -1051,7 +1051,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
selectCandidate: function() {
|
selectCandidate: function() {
|
||||||
var index = this._search.index || 0,
|
var index = (this._search.index && this._search.index != -1) ? this._search.index : 0,
|
||||||
re = new RegExp('^' + ((this._search.full) ? this._search.text : this._search.char), 'i'),
|
re = new RegExp('^' + ((this._search.full) ? this._search.text : this._search.char), 'i'),
|
||||||
itemCandidate, idxCandidate;
|
itemCandidate, idxCandidate;
|
||||||
|
|
||||||
|
@ -1061,6 +1061,8 @@ define([
|
||||||
if (!itemCandidate) {
|
if (!itemCandidate) {
|
||||||
itemCandidate = item;
|
itemCandidate = item;
|
||||||
idxCandidate = i;
|
idxCandidate = i;
|
||||||
|
if(!re.test(this.items[index].caption))
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (this._search.full && i==index || i>index) {
|
if (this._search.full && i==index || i>index) {
|
||||||
itemCandidate = item;
|
itemCandidate = item;
|
||||||
|
|
Loading…
Reference in a new issue