@acrsolutions/chat-components
Version:
Un set di componenti per la creazione di un'applicazione di messaggistica
24 lines (23 loc) • 692 B
TypeScript
export declare function useScrollToResearch({ messagesContainerRef, convoId,
/**
* Stato di loading dei messaggi
*/
isLoading,
/**
* Il filtro attivo sui messaggi, per cui vanno cercate le parole
*/
messagesFilter, }: {
messagesContainerRef: React.RefObject<HTMLDivElement>;
convoId: string;
isLoading: boolean;
messagesFilter: string;
}): {
counter: number;
handleSearchRefs: (messageId: string) => (ref: Record<string, HTMLSpanElement>) => void;
focusedRefKey: string | null;
goToPrevRef: () => void;
goToNextRef: () => void;
occurrencies: number;
focusedSpan: HTMLSpanElement | null;
getIndexInFocus: (messageId: string) => number;
};