Browse Source

Merge pull request #5813 from ArtemDzhereleiko/bug-fix/color-picker

[3.3.3] UI: Fixed cancel event on color picker
pull/5872/head
Igor Kulikov 5 years ago
committed by GitHub
parent
commit
62cea22df8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      ui-ngx/src/app/shared/components/json-form/json-form.component.ts

2
ui-ngx/src/app/shared/components/json-form/json-form.component.ts

@ -219,7 +219,7 @@ export class JsonFormComponent implements OnInit, ControlValueAccessor, Validato
val: tinycolor.ColorFormats.RGBA, val: tinycolor.ColorFormats.RGBA,
colorSelectedFn: (color: tinycolor.ColorFormats.RGBA) => void) { colorSelectedFn: (color: tinycolor.ColorFormats.RGBA) => void) {
this.dialogs.colorPicker(tinycolor(val).toRgbString()).subscribe((color) => { this.dialogs.colorPicker(tinycolor(val).toRgbString()).subscribe((color) => {
if (colorSelectedFn) { if (color && colorSelectedFn) {
colorSelectedFn(tinycolor(color).toRgb()); colorSelectedFn(tinycolor(color).toRgb());
} }
}); });

Loading…
Cancel
Save