Skip to content
Snippets Groups Projects
Commit df717f4e authored by OZGCloud's avatar OZGCloud
Browse files

OZG-6169 small fixes

parent 3b5dd56d
No related branches found
No related tags found
No related merge requests found
...@@ -100,7 +100,7 @@ export class VorgangSearchComponent implements OnInit, OnDestroy { ...@@ -100,7 +100,7 @@ export class VorgangSearchComponent implements OnInit, OnDestroy {
buildSearchResultPreviewLabel(vorgangListStateResource: StateResource<VorgangListResource>): string { buildSearchResultPreviewLabel(vorgangListStateResource: StateResource<VorgangListResource>): string {
const previewListLength = getEmbeddedResources(vorgangListStateResource, this.vorgangListLinkRel.VORGANG_HEADER_LIST)?.length; const previewListLength = getEmbeddedResources(vorgangListStateResource, this.vorgangListLinkRel.VORGANG_HEADER_LIST)?.length;
if (previewListLength === 1) return 'Ein Vorschlag wird angezeigt, nutze Pfeiltaste nach unten, um den zu erreichen'; if (previewListLength === 1) return 'Ein Vorschlag wird angezeigt, nutze Pfeiltaste nach unten, um diesen zu erreichen';
if (previewListLength > 1) if (previewListLength > 1)
return `${previewListLength} Vorschläge werden angezeigt, nutze Pfeiltaste nach unten, um diese zu erreichen`; return `${previewListLength} Vorschläge werden angezeigt, nutze Pfeiltaste nach unten, um diese zu erreichen`;
return EMPTY_STRING; return EMPTY_STRING;
......
...@@ -94,7 +94,7 @@ describe('VorgangSearchFormService', () => { ...@@ -94,7 +94,7 @@ describe('VorgangSearchFormService', () => {
expect(handleValueChanges).toHaveBeenCalledWith(value); expect(handleValueChanges).toHaveBeenCalledWith(value);
})); }));
it('should call not call handleValueChange after if lastKeyPressed is Enter', fakeAsync(() => { it('should not call handleValueChange if lastKeyPressed is Enter', fakeAsync(() => {
const handleValueChanges = jest.spyOn(formService, 'handleValueChanges'); const handleValueChanges = jest.spyOn(formService, 'handleValueChanges');
formService.setLastKeyPressed('Enter'); formService.setLastKeyPressed('Enter');
......
...@@ -72,8 +72,8 @@ export class VorgangSearchFormService implements OnDestroy { ...@@ -72,8 +72,8 @@ export class VorgangSearchFormService implements OnDestroy {
.valueChanges.pipe( .valueChanges.pipe(
distinctUntilChanged(), distinctUntilChanged(),
debounceTime(300), debounceTime(300),
tap((value) => this.setHasSearchString(value)),
filter(() => this.lastKeyPressedIsNotEnter()), filter(() => this.lastKeyPressedIsNotEnter()),
tap((value) => this.setHasSearchString(value)),
) )
.subscribe((value) => { .subscribe((value) => {
this.handleValueChanges(value); this.handleValueChanges(value);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment