ThreadListProps
Unpublished development API. This package is under development and is not available as a published release.
Supplies ordered conversations and controlled selection, with creation, row rendering, action, and context-menu hooks.
import type { ThreadListProps } from '@threadplane/react/chat';Declaration
export interface ThreadListProps {
readonly activeThreadId?: string | null;
readonly className?: string;
readonly label?: string;
readonly newThreadDisabled?: boolean;
readonly newThreadLabel?: string;
readonly now?: number;
readonly onContextMenu?: (threadId: string, event: MouseEvent<HTMLButtonElement> | KeyboardEvent<HTMLButtonElement>) => void;
readonly onNewThread?: () => void;
readonly onSelect: (threadId: string) => void;
readonly renderActions?: (thread: ThreadListItem) => ReactNode;
readonly renderItem?: (thread: ThreadListItem, isActive: boolean) => ReactNode;
readonly renderTitle?: (thread: ThreadListItem) => ReactNode;
readonly threads: readonly ThreadListItem[];
}Members
activeThreadId
readonly activeThreadId?: string | null;className
readonly className?: string;label
readonly label?: string;newThreadDisabled
readonly newThreadDisabled?: boolean;newThreadLabel
readonly newThreadLabel?: string;now
readonly now?: number;onContextMenu
Synchronous context request from the selection button; the owner claims input.
readonly onContextMenu?: (threadId: string, event: MouseEvent<HTMLButtonElement> | KeyboardEvent<HTMLButtonElement>) => void;onNewThread
readonly onNewThread?: () => void;onSelect
readonly onSelect: (threadId: string) => void;renderActions
App-owned controls rendered beside the selection button.
readonly renderActions?: (thread: ThreadListItem) => ReactNode;renderItem
Replaces the complete row content; owner supplies controls and accessibility.
readonly renderItem?: (thread: ThreadListItem, isActive: boolean) => ReactNode;renderTitle
Noninteractive phrasing content inside the row button. Original title/id labels remain.
readonly renderTitle?: (thread: ThreadListItem) => ReactNode;threads
readonly threads: readonly ThreadListItem[];