Skip to content

Commit c472ea4

Browse files
authored
Set debounce duration to 300ms (#2525)
The docs and code comments suggest that the debounce is 300ms, not 3 seconds. This ensures the example works as described.
1 parent 10e8492 commit c472ea4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Examples/Search/Search/SearchView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ struct SearchView: View {
165165
}
166166
.task(id: viewStore.searchQuery) {
167167
do {
168-
try await Task.sleep(for: .seconds(3))
168+
try await Task.sleep(for: .milliseconds(300))
169169
await viewStore.send(.searchQueryChangeDebounced).finish()
170170
} catch {}
171171
}

0 commit comments

Comments
 (0)