activeChat
activeChat: number;
Controls which chat is active (selected) in the ChatBot widget. The property sets the initial active chat when the widget is initialized. The default property value is 0
.
Example of usage:
const chat = new ChatBot(node, { activeChat: 1 });
How to set which chat is active (selected)
To change the active chat after the widget has been initialized, use the setConfig
method.
const chat = new ChatBot(node);
chat.setConfig({ activeChat: 1 });
How to get current state of which chat is active (selected)
To access the current active chat, use the getConfig
method.
const activeChat = chat.getConfig().activeChat;