From ea2a1e10b1f1691a232a9665d3faf9cd4338372f Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Fri, 17 Mar 2017 13:32:45 -0400 Subject: [PATCH] Make sure multiData array is updated when item is removed --- modules/ui/fields/combo.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ui/fields/combo.js b/modules/ui/fields/combo.js index 1fdb7759c..2c2c75b60 100644 --- a/modules/ui/fields/combo.js +++ b/modules/ui/fields/combo.js @@ -236,8 +236,9 @@ export function uiFieldCombo(field, context) { if (isMulti) { t[d.key] = undefined; } else if (isSemi) { + _.remove(multiData, function(md) { return md.key === d.key; }); var arr = multiData.map(function(md) { return md.key; }); - arr = _.compact(_.uniq(_.without(arr, d.key))); + arr = _.compact(_.uniq(arr)); t[field.key] = arr.length ? arr.join(';') : undefined; } dispatch.call('change', this, t);