Skip to content

ColorPicker - form id and empty value support #9304

@VincentRoth

Description

@VincentRoth

What problem does this feature solve?

In form, depending of the data model, the color cannot be optionnal and link with the form label is missing.
A default value of #1677ff seems to always be set while we may want to keep an empty (null, undefined...) value.

What does the proposed API look like?

<nz-form-item>
  <nz-form-label nzFor="primaryColor">Primary color</nz-form-label>
  <nz-form-control [nzErrorTip]="error">
    <nz-color-picker nzId="primaryColor" formControlName="primaryColor" />
  </nz-form-control>
</nz-form-item>
```<!-- generated by ng-zorro-issue-helper. DO NOT REMOVE -->

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions