Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

dropdown_list_widget: Reorder MultiSelectDropdownListWidget constructor.

Anders Kaseorg59c468037023
diff --git a/static/js/dropdown_list_widget.js b/static/js/dropdown_list_widget.js
index a166f1be6fa..a627dbacbf5 100644
--- a/static/js/dropdown_list_widget.js
+++ b/static/js/dropdown_list_widget.js
@@ -260,6 +260,15 @@ export function MultiSelectDropdownListWidget({
// A widget mostly similar to `DropdownListWidget` but
// used in cases of multiple dropdown selection.
+ DropdownListWidget.call(this, {
+ widget_name,
+ data,
+ default_text,
+ null_value,
+ on_update,
+ value,
+ });
+
// Initializing values specific to `MultiSelectDropdownListWidget`.
this.limit = limit;
this.on_close = on_close;
@@ -271,15 +280,6 @@ export function MultiSelectDropdownListWidget({
// essentially by just modifying the values in `data_selected` variable.
this.data_selected = []; // Populate the dropdown values selected by user.
- DropdownListWidget.call(this, {
- widget_name,
- data,
- default_text,
- null_value,
- on_update,
- value,
- });
-
if (limit === undefined) {
this.limit = 2;
blueslip.warn(