|
|
@ -54,6 +54,9 @@ export class EntitySubTypeListComponent implements ControlValueAccessor, OnInit, |
|
|
get required(): boolean { |
|
|
get required(): boolean { |
|
|
return this.requiredValue; |
|
|
return this.requiredValue; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Input() label: string; |
|
|
|
|
|
|
|
|
@Input() |
|
|
@Input() |
|
|
set required(value: boolean) { |
|
|
set required(value: boolean) { |
|
|
const newVal = coerceBooleanProperty(value); |
|
|
const newVal = coerceBooleanProperty(value); |
|
|
@ -223,6 +226,12 @@ export class EntitySubTypeListComponent implements ControlValueAccessor, OnInit, |
|
|
this.clear(''); |
|
|
this.clear(''); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
clearChipGrid() { |
|
|
|
|
|
this.entitySubtypeList = []; |
|
|
|
|
|
this.modelValue = null; |
|
|
|
|
|
this.entitySubtypeListFormGroup.get('entitySubtypeList').patchValue([], {emitEvent: true}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
remove(entitySubtype: string) { |
|
|
remove(entitySubtype: string) { |
|
|
const index = this.entitySubtypeList.indexOf(entitySubtype); |
|
|
const index = this.entitySubtypeList.indexOf(entitySubtype); |
|
|
if (index >= 0) { |
|
|
if (index >= 0) { |
|
|
@ -249,9 +258,7 @@ export class EntitySubTypeListComponent implements ControlValueAccessor, OnInit, |
|
|
this.searchText = searchText; |
|
|
this.searchText = searchText; |
|
|
return this.getEntitySubtypes().pipe( |
|
|
return this.getEntitySubtypes().pipe( |
|
|
map(subTypes => { |
|
|
map(subTypes => { |
|
|
let result = subTypes.filter( subType => { |
|
|
let result = subTypes.filter( subType => searchText ? subType.toUpperCase().startsWith(searchText.toUpperCase()) : true); |
|
|
return searchText ? subType.toUpperCase().startsWith(searchText.toUpperCase()) : true; |
|
|
|
|
|
}); |
|
|
|
|
|
if (!result.length) { |
|
|
if (!result.length) { |
|
|
result = [searchText]; |
|
|
result = [searchText]; |
|
|
} |
|
|
} |
|
|
|