Fixed new file event emitter

This commit is contained in:
Adina Țeudan 2021-10-12 16:05:49 +03:00
parent 6019a14952
commit f3cb55f2c2
2 changed files with 3 additions and 7 deletions

View File

@ -21,7 +21,7 @@
</div>
<div *ngFor="let config of displayedAttributes" class="cell">
{{ file.fileAttributes.attributeIdToValue[config.id] }}
{{ file.fileAttributes.attributeIdToValue[config.id] || '-' }}
</div>
<!-- always show A for error-->

View File

@ -175,11 +175,7 @@ export class ConfigService {
dynamicFilters.set(filterKey, new Set<string>());
filters = dynamicFilters.get(filterKey);
}
let filterValue = file.fileAttributes?.attributeIdToValue[config.id];
if (!filterValue) {
filterValue = '-';
file.fileAttributes.attributeIdToValue[config.id] = '-';
}
const filterValue = file.fileAttributes?.attributeIdToValue[config.id];
filters.add(filterValue);
}
});
@ -257,7 +253,7 @@ export class ConfigService {
(value: string) =>
new NestedFilter({
id: value,
label: value === '-' ? this._translateService.instant('filters.empty') : value,
label: value === undefined ? this._translateService.instant('filters.empty') : value,
}),
),
checker: (input: File, filter: INestedFilter) => filter.id === input.fileAttributes.attributeIdToValue[id],