Skip to content

Commit

Permalink
refactor: prevent SearchController from keeping input reference
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinCupela committed Jan 16, 2025
1 parent cbf3767 commit 29cd049
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/search_controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,6 @@ export type SearchControllerState<
// FIXME: focusedMessage should live in a MessageListController class that does not exist yet.
// This state prop should be then removed
focusedMessage?: MessageResponse<StreamChatGenerics>;
input?: HTMLInputElement;
};

export type SearchControllerConfig = {
Expand Down Expand Up @@ -410,10 +409,6 @@ export class SearchController<
return this.sources.map((s) => s.type);
}

setInputElement = (input: HTMLInputElement) => {
this.state.partialNext({ input });
};

addSource = (source: SearchSource) => {
this.state.partialNext({
sources: [...this.sources, source],
Expand Down

0 comments on commit 29cd049

Please sign in to comment.