Skip to content

Color picker: Canvas input fields are not filled in #13

@traveler366

Description

@traveler366

Hi,

In the color picker there's an issue where the input fields of the dialog/popup are not filled in on init nor on change.

The issue is in file color-canvas.component.ts the alias of the property is used instead of the property name.
The OnChange only adds properties with the property name not the alias.

Changing the method ngOnChanges to code below will fix the issue. (couldn't create a PR since i don't have permissions)

ngOnChanges(changes: SimpleChanges): void {
    if (changes.setColor && changes.setColor.currentValue) {
      this.updateForm(changes.setColor.currentValue);
      if (this._resetBaseColor) {
        this._baseColor = changes.setColor.currentValue;
      }

      this._resetBaseColor = true;

      if (!changes.setColor.firstChange) {
        this.draw();
      }
    }
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions