-
Notifications
You must be signed in to change notification settings - Fork 370
Open
Description
I'm submitting a
[x] Bug / Regression
[ ] Feature Request / Proposal
I'm using
NG Dynamic Forms Version: `X.Y.Z`
[ ] Basic UI
[ ] Bootstrap UI
[ ] Foundation UI
[ ] Ionic UI
[ ] Kendo UI
[x] Material
[ ] NG Bootstrap
[ ] Prime NG
Description
Add support for showing validation errors for auto complete chip-list in material (DynamicMaterialChipsComponent).
`<mat-form-field [appearance]="model.getAdditional('appearance', 'legacy')"
[color]="model.getAdditional('color', 'primary')"
[floatLabel]="model.getAdditional('floatLabel', LABEL_OPTIONS && LABEL_OPTIONS['float'] || 'auto')"
[formGroup]="group"
[hideRequiredMarker]="model.getAdditional('hideRequiredMarker', false)"
[ngClass]="getClass('grid', 'control')">
<mat-chip-list #matChipList [formControlName]="model.id" [id]="id" [multiple]="true">
<mat-chip *ngFor="let chip of chips; let index = index"
[selectable]="false"
(removed)="onChipRemoved(chip, index)">
<span>{{ chip }}</span>
<mat-icon matChipRemove>cancel</mat-icon>
</mat-chip>
<input matInput
[matAutocomplete]="matAutocomplete"
[matChipInputAddOnBlur]="model.getAdditional('matChipInputAddOnBlur', true)"
[matChipInputFor]="matChipList"
[matChipInputSeparatorKeyCodes]="model.getAdditional('matChipInputSeparatorKeyCodes', CHIPS_OPTIONS['separatorKeyCodes'])"
[placeholder]="model.placeholder"
(matChipInputTokenEnd)="onChipInputTokenEnd($event)"
(blur)="onBlur($event)"
(focus)="onFocus($event)"/>
<mat-autocomplete #matAutocomplete="matAutocomplete"
[autoActiveFirstOption]="model.getAdditional('autoActiveFirstOption', AUTOCOMPLETE_OPTIONS['autoActiveFirstOption'])"
[disableRipple]="model.getAdditional('disableRipple', RIPPLE_OPTIONS && RIPPLE_OPTIONS['disabled'] || false)"
[displayWith]="model.getAdditional('displayWith', null)"
(optionSelected)="onChipSelected($event)">
<mat-option *ngFor="let option of model.list$ | async" [value]="option">{{ option }}</mat-option>
</mat-autocomplete>
</mat-chip-list>
<mat-error *ngFor="let message of errorMessages">{{ message }}</mat-error>
I can raise a PR for the same.
Metadata
Metadata
Assignees
Labels
No labels