support autocomplete via callback in filters
This commit is contained in:
parent
3a37d136ec
commit
278f3fa6ca
1 changed files with 5 additions and 1 deletions
|
@ -331,10 +331,11 @@ Ox.Filter = function(options, self) {
|
||||||
newConditionType = getConditionType(newFindKey.type),
|
newConditionType = getConditionType(newFindKey.type),
|
||||||
changeConditionType = oldConditionType != newConditionType,
|
changeConditionType = oldConditionType != newConditionType,
|
||||||
changeConditionFormat = !Ox.isEqual(oldFindKey.format, newFindKey.format),
|
changeConditionFormat = !Ox.isEqual(oldFindKey.format, newFindKey.format),
|
||||||
|
changeConditionAutocomplete = !Ox.isEqual(oldFindKey.autocomplete, newFindKey.autocomplete),
|
||||||
wasUselessCondition = isUselessCondition(pos, subpos);
|
wasUselessCondition = isUselessCondition(pos, subpos);
|
||||||
Ox.Log('Form', 'old new', oldConditionType, newConditionType)
|
Ox.Log('Form', 'old new', oldConditionType, newConditionType)
|
||||||
condition.key = key;
|
condition.key = key;
|
||||||
if (changeConditionType || changeConditionFormat) {
|
if (changeConditionType || changeConditionFormat || changeConditionAutocomplete) {
|
||||||
if (Ox.getIndexById(self.conditionOperators[newConditionType], condition.operator) == -1) {
|
if (Ox.getIndexById(self.conditionOperators[newConditionType], condition.operator) == -1) {
|
||||||
condition.operator = self.conditionOperators[newConditionType][0].id;
|
condition.operator = self.conditionOperators[newConditionType][0].id;
|
||||||
}
|
}
|
||||||
|
@ -845,6 +846,9 @@ Ox.Filter = function(options, self) {
|
||||||
$input = Ox.Input({
|
$input = Ox.Input({
|
||||||
type: type,
|
type: type,
|
||||||
value: value,
|
value: value,
|
||||||
|
autocomplete: findKey.autocomplete,
|
||||||
|
autocompleteSelect: true,
|
||||||
|
autocompleteSelectSubmit: true,
|
||||||
width: !isArray ? 288 : 128
|
width: !isArray ? 288 : 128
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue