Skip to content
Snippets Groups Projects
Commit 9b7321ec authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Add select2 bug workaround for person-select as well

See #40
parent 7aaa4653
No related branches found
No related tags found
No related merge requests found
Pipeline #14884 passed
......@@ -159,6 +159,8 @@ export class PersonSelect extends ScopedElementsMixin(LitElement) {
};
},
processResults: function (data) {
that.$('#person-select-dropdown').addClass('select2-bug');
that.lastResult = data;
let transformed = that.jsonld.transformMembers(data, personContext);
const results = [];
......@@ -176,6 +178,8 @@ export class PersonSelect extends ScopedElementsMixin(LitElement) {
}
}
}).on("select2:select", function (e) {
that.$('#person-select-dropdown').removeClass('select2-bug');
// set custom element attributes
const identifier = e.params.data.id;
that.object = findObjectInApiResults(identifier, that.lastResult);
......@@ -329,6 +333,11 @@ export class PersonSelect extends ScopedElementsMixin(LitElement) {
.field .button.control dbp-icon {
top: 0;
}
/* https://github.com/select2/select2/issues/5457 */
.select2-bug .loading-results {
display: none !important;
}
`
];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment