MessageListProps
Unpublished development API. This package is under development and is not available as a published release.
Supplies projected transcript rows and an optional stable custom renderer to a scrolling list with memoized rows.
import type { MessageListProps } from '@threadplane/react/chat';Declaration
export interface MessageListProps<TRow extends MessageRow = MessageRow> {
readonly className?: string;
readonly label?: string;
readonly renderMessage?: (row: NoInfer<RenderRow<TRow>>) => ReactNode;
readonly rows: readonly TRow[];
}Type parameters
TRowMessageRowDefault:MessageRow
Members
className
readonly className?: string;label
readonly label?: string;renderMessage
Replace the default row rendering. Must be referentially stable (define it
outside the component or wrap it in useCallback); a new function each
render defeats row memoization and re-renders every row.
readonly renderMessage?: (row: NoInfer<RenderRow<TRow>>) => ReactNode;rows
readonly rows: readonly TRow[];