forked from 0x2620/oxjs
improve listmap editing functionality
This commit is contained in:
parent
76606689d7
commit
02442a24f7
6 changed files with 81 additions and 56 deletions
|
|
@ -132,9 +132,14 @@ Ox.ArrayInput = function(options, self) {
|
|||
|
||||
self.setOption = function(key, value) {
|
||||
if (key == 'value') {
|
||||
return Ox.map(self.$input, function($input) {
|
||||
var value = $input.value();
|
||||
return value === '' ? null : value;
|
||||
if (self.options.value.length == 0) {
|
||||
self.options.value = [''];
|
||||
}
|
||||
self.$input && self.$input.forEach(function($input, i) {
|
||||
removeInput(i);
|
||||
});
|
||||
self.options.value.forEach(function(value, i) {
|
||||
addInput(i, value);
|
||||
});
|
||||
} else if (key == 'width') {
|
||||
setWidths();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue