This is documentation for Stream Chat Angular SDK v4, which is nolonger actively maintained. For up-to-date documentation, see the latest version (v5).

ChannelListToggleService

The ChannelListToggleService can be used to toggle the channel list.

deprecated This service can only be used with theming-v1, if you are using thmeing-v2 please refer to our responsive layout guide

Properties

isOpen$

isOpen$: Observable<boolean>

Emits true if the channel list is in open state, otherwise it emits false

Defined in

lib/channel-list/channel-list-toggle.service.ts:15

Methods

channelSelected

channelSelected(): void

This method should be called if a channel was selected, if on mobile, the channel list will be closed.

Returns

void

Defined in

lib/channel-list/channel-list-toggle.service.ts:60


close

close(): void

Closes the channel list.

Returns

void

Defined in

lib/channel-list/channel-list-toggle.service.ts:38


open

open(): void

Opens the channel list.

Returns

void

Defined in

lib/channel-list/channel-list-toggle.service.ts:31


setMenuElement

setMenuElement(element): void

Sets the channel list element, on mobile screen size if the user opens the channel list, and clicks outside, the service automatically closes the channel list if a reference to the HTML element is provided.

Parameters

NameType
elementundefined | HTMLElement

Returns

void

Defined in

lib/channel-list/channel-list-toggle.service.ts:53


toggle

toggle(): void

Opens the channel list if it was closed, and closes if it was opened.

Returns

void

Defined in

lib/channel-list/channel-list-toggle.service.ts:45

© Getstream.io, Inc. All Rights Reserved.