mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-26 11:08:38 +03:00
clean results on query update
This commit is contained in:
parent
fa06ec611d
commit
db9eccc5d5
@ -1,17 +1,17 @@
|
||||
import { invoke } from '@tauri-apps/api';
|
||||
|
||||
export type SearchResult = {
|
||||
projectId: string;
|
||||
sessionId: string;
|
||||
filePath: string;
|
||||
// index of the delta in the session.
|
||||
index: number;
|
||||
highlighted: string[]; // contains the highlighted text
|
||||
projectId: string;
|
||||
sessionId: string;
|
||||
filePath: string;
|
||||
// index of the delta in the session.
|
||||
index: number;
|
||||
highlighted: string[]; // contains the highlighted text
|
||||
};
|
||||
|
||||
export const search = (params: {
|
||||
projectId: string;
|
||||
query: string;
|
||||
limit?: number;
|
||||
offset?: number;
|
||||
projectId: string;
|
||||
query: string;
|
||||
limit?: number;
|
||||
offset?: number;
|
||||
}) => invoke<SearchResult[]>('search', params);
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
$: {
|
||||
stopProcessing = true;
|
||||
processedResults = [];
|
||||
if ($searchTerm) {
|
||||
fetchResults($project?.id ?? '', $searchTerm);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user