Skip to content

Commit 02ee798

Browse files
feat: debounce filter form in ESS services starter
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent dc427bc commit 02ee798

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/app/domains/ticketing/feature-booking/flight-search/flight-search.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
effect,
88
signal,
99
} from '@angular/core';
10-
import { form, FormField } from '@angular/forms/signals';
10+
import { debounce, form, FormField } from '@angular/forms/signals';
1111

1212
import { Flight } from '../../data/flight';
1313

@@ -19,7 +19,9 @@ import { Flight } from '../../data/flight';
1919
})
2020
export class FlightSearch {
2121
protected readonly filter = signal({ from: 'Graz', to: 'Hamburg' });
22-
protected readonly filterForm = form(this.filter);
22+
protected readonly filterForm = form(this.filter, (path) => {
23+
debounce(path, 300);
24+
});
2325

2426
protected readonly flightRoute = computed(
2527
() => this.filter().from + ' to ' + this.filter().to,

0 commit comments

Comments
 (0)