JavaScript/jQuery Chat Options

activeStateEnabled

Type:

Boolean

Default Value: true

alerts

Type:

Array<Alert>

Default Value: undefined

dataSource

Default Value: null

disabled

Specifies whether the UI component responds to user interaction.

Type:

Boolean

Default Value: false

elementAttr

Specifies the global attributes to be attached to the UI component's container element.

Type:

Object

Default Value: {}

jQuery
$(function(){
    $("#chatContainer").dxChat({
        // ...
        elementAttr: {
            id: "elementId",
            class: "class-name"
        }
    });
});
Angular
HTML
TypeScript
<dx-chat ...
    [elementAttr]="{ id: 'elementId', class: 'class-name' }">
</dx-chat>
import { DxChatModule } from "devextreme-angular";
// ...
export class AppComponent {
    // ...
}
@NgModule({
    imports: [
        // ...
        DxChatModule
    ],
    // ...
})
Vue
App.vue
<template>
    <DxChat ...
        :element-attr="chatAttributes">
    </DxChat>
</template>

<script>
import DxChat from 'devextreme-vue/chat';

export default {
    components: {
        DxChat
    },
    data() {
        return {
            chatAttributes: {
                id: 'elementId',
                class: 'class-name'
            }
        }
    }
}
</script>
React
App.js
import React from 'react';

import Chat from 'devextreme-react/chat';

class App extends React.Component {
    chatAttributes = {
        id: 'elementId',
        class: 'class-name'
    }

    render() {
        return (
            <Chat ...
                elementAttr={this.chatAttributes}>
            </Chat>
        );
    }
}
export default App;

errors

Type:

Array<ChatError>

Default Value: undefined

focusStateEnabled

Type:

Boolean

Default Value: true

height

Specifies the UI component's height.

Type:

Number

|

String

|

Function

Return Value:

Number

|

String

The UI component's height.

Default Value: undefined

This property accepts a value of one of the following types:

  • Number
    The height in pixels.

  • String
    A CSS-accepted measurement of height. For example, "55px", "20vh", "80%", "inherit".

  • Function (deprecated since v21.2)
    Refer to the W0017 warning description for information on how you can migrate to viewport units.

hoverStateEnabled

Type:

Boolean

Default Value: true

items

Type:

Array<Message>

Raised Events: onOptionChanged

message

Type:

Message

onDisposing

Type:

Function

Function parameters:

Object structure:
Name Type Description
element

HTMLElement | jQuery

component Chat

Default Value: null

onInitialized

Type:

Function

Function parameters:

Object structure:
Name Type Description
element

HTMLElement | jQuery

component Chat

Default Value: null

onMessageEntered

Type:

Function

Function parameters:
e: ui/chat:MessageEnteredEvent

Object structure:
Name Type Description
component Chat

element

HTMLElement | jQuery

event

Event (jQuery or EventObject)

message

Message

Default Value: undefined

onMessageSend

Type:

Function

Function parameters:

Object structure:
Name Type Description
component Chat

element

HTMLElement | jQuery

event

Event (jQuery or EventObject)

message

Message

Default Value: undefined

onOptionChanged

Type:

Function

Function parameters:

Object structure:
Name Type Description
value any

previousValue any

name

String

fullName

String

element

HTMLElement | jQuery

component Chat

Default Value: null

onTypingEnd

Type:

Function

Function parameters:
e: ui/chat:TypingEndEvent

Object structure:
Name Type Description
component Chat

element

HTMLElement | jQuery

user

User

Default Value: undefined

onTypingStart

Type:

Function

Function parameters:
e: ui/chat:TypingStartEvent

Object structure:
Name Type Description
component Chat

element

HTMLElement | jQuery

event

Event (jQuery or EventObject)

user

User

Default Value: undefined

reloadOnChange

Type:

Boolean

Default Value: true

rtlEnabled

Switches the UI component to a right-to-left representation.

Type:

Boolean

Default Value: false

When this property is set to true, the UI component text flows from right to left, and the layout of elements is reversed. To switch the entire application/site to the right-to-left representation, assign true to the rtlEnabled field of the object passed to the DevExpress.config(config) method.

JavaScript
DevExpress.config({
    rtlEnabled: true
});

DataGrid Demo Navigation UI Demo Editors Demo

showAvatar

Type:

Boolean

Default Value: true

showDayHeaders

Type:

Boolean

Default Value: true

showMessageTimestamp

Type:

Boolean

Default Value: true

showUserName

Type:

Boolean

Default Value: true

title

Type:

String

Default Value: ''

typingUsers

Type:

Array<User>

Default Value: []

user

Type:

User

Default Value: { id: new Guid().toString() }

visible

Specifies whether the UI component is visible.

Type:

Boolean

Default Value: true

width

Specifies the UI component's width.

Type:

Number

|

String

|

Function

Return Value:

Number

|

String

The UI component's width.

Default Value: undefined

This property accepts a value of one of the following types:

  • Number
    The width in pixels.

  • String
    A CSS-accepted measurement of width. For example, "55px", "20vw", "80%", "auto", "inherit".

  • Function (deprecated since v21.2)
    Refer to the W0017 warning description for information on how you can migrate to viewport units.