mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	dropdown_list_widget: Reorder MultiSelectDropdownListWidget constructor.
ES6 class constructors must call the superclass constructor before accessing this. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							175dd999ac
						
					
				
				
					commit
					59c4680370
				
			@@ -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(
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user