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,
|
||||
value: optionValue,
|
||||
selected: (selectedValues == optionValue) ||
|
||||
(_.indexOf(selectedValues, optionValue) > -1)
|
||||
(select2_opts.multiple && _.indexOf(selectedValues, optionValue) > -1)
|
||||
}));
|
||||
} else {
|
||||
opt = _.defaults({}, opt, {
|
||||
selected: ((selectedValues == opt.value) ||
|
||||
(_.indexOf(selectedValues, opt.value) > -1)),
|
||||
(select2_opts.multiple && _.indexOf(selectedValues, opt.value) > -1)),
|
||||
}, self.defaults.opt);
|
||||
$select.append(self.template(opt));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user