Merge pull request #26849 from woocommerce/fix/26845

Put back the remove element for multiselects on selectWoo
This commit is contained in:
Peter Fabian 2020-06-23 15:00:02 +02:00 committed by GitHub
commit a442f183ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 2 deletions

View File

@ -1748,12 +1748,14 @@ S2.define('select2/selection/multiple',[
var selection = data[d]; var selection = data[d];
var $selection = this.selectionContainer(); var $selection = this.selectionContainer();
var removeItemTag = $selection.html();
var formatted = this.display(selection, $selection); var formatted = this.display(selection, $selection);
if ('string' === typeof formatted) { if ('string' === typeof formatted) {
formatted = Utils.entityDecode(formatted.trim()); formatted = Utils.entityDecode(formatted.trim());
} }
$selection.text(formatted); $selection.text(formatted);
$selection.prepend(removeItemTag);
$selection.prop('title', selection.title || selection.text); $selection.prop('title', selection.title || selection.text);
$selection.data('data', selection); $selection.data('data', selection);

File diff suppressed because one or more lines are too long

View File

@ -1748,12 +1748,14 @@ S2.define('select2/selection/multiple',[
var selection = data[d]; var selection = data[d];
var $selection = this.selectionContainer(); var $selection = this.selectionContainer();
var removeItemTag = $selection.html();
var formatted = this.display(selection, $selection); var formatted = this.display(selection, $selection);
if ('string' === typeof formatted) { if ('string' === typeof formatted) {
formatted = Utils.entityDecode(formatted.trim()); formatted = Utils.entityDecode(formatted.trim());
} }
$selection.text(formatted); $selection.text(formatted);
$selection.prepend(removeItemTag);
$selection.prop('title', selection.title || selection.text); $selection.prop('title', selection.title || selection.text);
$selection.data('data', selection); $selection.data('data', selection);

File diff suppressed because one or more lines are too long