Skip to main content

Overview

CometChatCallLogs is a scrollable list component that displays the user’s call history. Each item shows call direction (incoming/outgoing/missed), participant info, duration, and timestamp. The trailing view includes a call button to re-initiate calls directly from the log.
Live Preview — interact with the call logs component.Open in Storybook ↗
The component handles:
  • Paginated fetching of call logs with infinite scroll
  • Call direction indicators (incoming, outgoing, missed)
  • Call duration and timestamp display
  • Call button in trailing view to re-initiate calls
  • Transition to outgoing/ongoing call screens internally when a call is initiated
  • Active call highlighting
No real-time updates: This component fetches call logs via the request builder on mount and does not attach SDK listeners for real-time updates. Pull-to-refresh or remounting is needed to see new call logs.

Usage

Flat API

Full Layout Example


Filtering

Pass a custom callLogRequestBuilder to control which call logs are fetched. The default fetches up to 30 call logs with category “call”. Refer to CallLogRequestBuilder for the full builder API.

Filter Recipes


Actions and Events

Callback Props

Events Emitted

This component does not emit any UI events.

Events Received

UI events this component subscribes to (published by other components):

SDK Listeners (Automatic)

This component does not attach any SDK listeners. It fetches call logs via the request builder on mount and uses infinite scroll for pagination. No real-time updates are received.

Customization

View Props

Use view props to replace sections of the default UI while keeping the component’s behavior intact:

CSS Styling

Override design tokens on the component selector:

Props

All props are optional.

activeCall

Object representing the currently active/selected call log. The matching item receives an active visual state.

callLogRequestBuilder

Custom request builder for filtering and paginating call logs.

callInitiatedDateTimeFormat

Custom date/time format for the call initiation timestamp shown in each call log item.

onItemClick

Callback when a call log item is clicked.

onCallButtonClicked

Callback when the call button (in the trailing view) is clicked to re-initiate a call.

onError

Callback when an SDK error occurs during fetch operations.

callSettingsBuilder

Custom call settings builder for ongoing call sessions initiated from call logs. Falls back to GlobalConfig.callSettingsBuilder, then default settings.

loadingView

Custom loading state view shown while call logs are being fetched.

emptyView

Custom empty state view shown when no call logs exist.

errorView

Custom error state view shown when fetching call logs fails.

itemView

Custom renderer for the entire call log row.

leadingView

Custom renderer for the avatar section.

titleView

Custom renderer for the participant name.

subtitleView

Custom renderer for the call direction and duration section.

trailingView

Custom renderer for the trailing section (call button + timestamp).

showScrollbar

Show the native scrollbar on the call logs list.

CSS Selectors


Next Steps

Incoming Call

Handle incoming call notifications with accept/decline actions

Outgoing Call

Display the outgoing call screen while waiting for the receiver to answer

Theming

Customize colors, fonts, and spacing