Vladyslav Prykhodko
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
11 additions and
0 deletions
-
ui-ngx/src/app/shared/components/entity/entity-list.component.ts
|
|
|
@ -56,6 +56,11 @@ import { coerceBoolean } from '@shared/decorators/coercion'; |
|
|
|
provide: NG_VALUE_ACCESSOR, |
|
|
|
useExisting: forwardRef(() => EntityListComponent), |
|
|
|
multi: true |
|
|
|
}, |
|
|
|
{ |
|
|
|
provide: NG_VALIDATORS, |
|
|
|
useExisting: forwardRef(() => EntityListComponent), |
|
|
|
multi: true |
|
|
|
} |
|
|
|
] |
|
|
|
}) |
|
|
|
@ -203,6 +208,12 @@ export class EntityListComponent implements ControlValueAccessor, OnInit, AfterV |
|
|
|
this.dirty = true; |
|
|
|
} |
|
|
|
|
|
|
|
validate(): ValidationErrors | null { |
|
|
|
return this.entityListFormGroup.valid ? null : { |
|
|
|
entities: {valid: false} |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
private reset() { |
|
|
|
this.entities = []; |
|
|
|
this.entityListFormGroup.get('entities').setValue(this.entities); |
|
|
|
|