Skip to content

Commit 84056ff

Browse files
committed
batch-changes: do not use searchText to set List searchText
1 parent f054a7f commit 84056ff

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

‎CHANGELOG.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
- **batch-changes**: Fix an issue where typing quickly could cause missed characters.
6+
37
## [Batch Changes, revamped previews, and refined behaviour](https://github.com/raycast/extensions/pull/1228) - 2022-04-03
48

59
- **batch-changes**: "Manage Batch Changes" is a new command that allows you to browse, view, publish, merge, and retry changesets for [Sourcegraph Batch Changes](https://about.sourcegraph.com/batch-changes)! This is only supported on Sourcegraph Self-Hosted. ([#11](https://github.com/bobheadxi/raycast-sourcegraph/pull/11), [#13](https://github.com/bobheadxi/raycast-sourcegraph/pull/13))

‎src/components/ManageBatchChangesCommand.tsx‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ import {
3333
*/
3434
export default function ManageBatchChanges({ src }: { src: Sourcegraph }) {
3535
const srcName = instanceName(src);
36+
37+
/**
38+
* searchText should not be used to set the search text in the filter, because this
39+
* causes a funky typing experience with throttle=false and the built-in filtering. As
40+
* such, setSearchText should also never be used except by List.
41+
*/
3642
const [searchText, setSearchText] = useState("");
3743

3844
const { loading, error, data, refetch } = useQuery<GetBatchChanges>(GET_BATCH_CHANGES, {
@@ -53,7 +59,6 @@ export default function ManageBatchChanges({ src }: { src: Sourcegraph }) {
5359
<List
5460
isLoading={loading}
5561
searchBarPlaceholder={`Manage batch changes on ${srcName}`}
56-
searchText={searchText}
5762
onSearchTextChange={setSearchText}
5863
enableFiltering={true}
5964
selectedItemId={showSuggestions ? "first-result" : undefined}

0 commit comments

Comments
 (0)