UI: Fixed cancel event on color picker
This commit is contained in:
		
							parent
							
								
									bbab11d5aa
								
							
						
					
					
						commit
						fa1cd21473
					
				@ -67,7 +67,7 @@ export class ColorPickerDialogComponent extends DialogComponent<ColorPickerDialo
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  cancel(): void {
 | 
			
		||||
    this.dialogRef.close(this.data.color);
 | 
			
		||||
    this.dialogRef.close(null);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  select(): void {
 | 
			
		||||
 | 
			
		||||
@ -217,7 +217,7 @@ export class JsonFormComponent implements OnInit, ControlValueAccessor, Validato
 | 
			
		||||
                       val: tinycolor.ColorFormats.RGBA,
 | 
			
		||||
                       colorSelectedFn: (color: tinycolor.ColorFormats.RGBA) => void) {
 | 
			
		||||
    this.dialogs.colorPicker(tinycolor(val).toRgbString()).subscribe((color) => {
 | 
			
		||||
      if (colorSelectedFn) {
 | 
			
		||||
      if (color && colorSelectedFn) {
 | 
			
		||||
        colorSelectedFn(tinycolor(color).toRgb());
 | 
			
		||||
      }
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user