support autocomplete via callback in filters

This commit is contained in:
j 2018-11-13 15:30:23 +00:00
parent 3a37d136ec
commit 278f3fa6ca

View file

@ -331,10 +331,11 @@ Ox.Filter = function(options, self) {
newConditionType = getConditionType(newFindKey.type),
changeConditionType = oldConditionType != newConditionType,
changeConditionFormat = !Ox.isEqual(oldFindKey.format, newFindKey.format),
changeConditionAutocomplete = !Ox.isEqual(oldFindKey.autocomplete, newFindKey.autocomplete),
wasUselessCondition = isUselessCondition(pos, subpos);
Ox.Log('Form', 'old new', oldConditionType, newConditionType)
condition.key = key;
if (changeConditionType || changeConditionFormat) {
if (changeConditionType || changeConditionFormat || changeConditionAutocomplete) {
if (Ox.getIndexById(self.conditionOperators[newConditionType], condition.operator) == -1) {
condition.operator = self.conditionOperators[newConditionType][0].id;
}
@ -845,6 +846,9 @@ Ox.Filter = function(options, self) {
$input = Ox.Input({
type: type,
value: value,
autocomplete: findKey.autocomplete,
autocompleteSelect: true,
autocompleteSelectSubmit: true,
width: !isArray ? 288 : 128
});
}