mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Select2Cell: Check if cell is in multiselect mode before setting default selection of multiple values. Fixes #2283
This commit is contained in:
parent
5b12fd6d5f
commit
720aefbe6f
@ -648,12 +648,12 @@
|
|||||||
label: optionText,
|
label: optionText,
|
||||||
value: optionValue,
|
value: optionValue,
|
||||||
selected: (selectedValues == optionValue) ||
|
selected: (selectedValues == optionValue) ||
|
||||||
(_.indexOf(selectedValues, optionValue) > -1)
|
(select2_opts.multiple && _.indexOf(selectedValues, optionValue) > -1)
|
||||||
}));
|
}));
|
||||||
} else {
|
} else {
|
||||||
opt = _.defaults({}, opt, {
|
opt = _.defaults({}, opt, {
|
||||||
selected: ((selectedValues == opt.value) ||
|
selected: ((selectedValues == opt.value) ||
|
||||||
(_.indexOf(selectedValues, opt.value) > -1)),
|
(select2_opts.multiple && _.indexOf(selectedValues, opt.value) > -1)),
|
||||||
}, self.defaults.opt);
|
}, self.defaults.opt);
|
||||||
$select.append(self.template(opt));
|
$select.append(self.template(opt));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user