Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Don't set multiple attribute on custom element

Oliver Günther86db1cbd334e
diff --git a/frontend/src/app/features/reporting/reporting-page/functionality/reporting_engine/filters.js b/frontend/src/app/features/reporting/reporting-page/functionality/reporting_engine/filters.js
index a966e85f7ba..31edb6b1dd5 100644
--- a/frontend/src/app/features/reporting/reporting-page/functionality/reporting_engine/filters.js
+++ b/frontend/src/app/features/reporting/reporting-page/functionality/reporting_engine/filters.js
@@ -324,7 +324,7 @@ Reporting.Filters = function($){
.on("change", function (evt) {
var filter_name = $(this).attr("data-filter-name");
Reporting.Filters.operator_changed(filter_name, $(this));
- const argVal =$('#' + filter_name + "_arg_1_val")[0];
+ const argVal = $('#' + filter_name + "_arg_1_val")[0];
if (argVal) {
Reporting.fireEvent(argVal, "change");
}
@@ -340,7 +340,11 @@ Reporting.Filters = function($){
var select = $(this);
var select_value = select.val();
- select.attr('multiple', select_value && select_value.length > 1);
+ // Don't try to set multiple on the autocompleters, it is already multi-select
+ // and will trigger weird change detection cycles
+ if (this.tagName.toLowerCase() !== 'opce-project-autocompleter') {
+ select.attr('multiple', select_value && select_value.length > 1);
+ }
select.on("change", function (evt) {
var filter_name = $(this).closest('li').attr("data-filter-name");