diff --git a/source/UI/js/Form/ArrayInput.js b/source/UI/js/Form/ArrayInput.js index 4a6e5752..4e4fb9b1 100644 --- a/source/UI/js/Form/ArrayInput.js +++ b/source/UI/js/Form/ArrayInput.js @@ -20,7 +20,10 @@ Ox.ArrayInput = function(options, self) { self = self || {}; var that = Ox.Element({}, self) .defaults({ - getInput: null, + getInput: Ox.Input, + isEmpty: function(value) { + return value === ''; + }, label: '', max: 0, setWidth: null, @@ -34,7 +37,6 @@ Ox.ArrayInput = function(options, self) { width: setWidths }); - self.options.getInput = self.options.getInput || Ox.Input; self.options.value = self.options.value || []; if (self.options.label) { @@ -138,7 +140,7 @@ Ox.ArrayInput = function(options, self) { return Ox.map(self.$input, function($input) { return $input.value(); }).filter(function(value) { - return value !== ''; + return !self.options.isEmpty(value); }); };