Angular SpeedDialAction Properties

This section describes properties that configure the SpeedDialAction UI component's contents, behavior, and appearance.

accessKey

Specifies the shortcut key that sets focus on the UI component.

Type:

String

Default Value: undefined

The value of this property will be passed to the accesskey attribute of the HTML element that underlies the UI component.

activeStateEnabled

Specifies whether the UI component changes its visual state as a result of user interaction.

Type:

Boolean

Default Value: false

The UI component switches to the active state when users press down the primary mouse button. When this property is set to true, the CSS rules for the active state apply. You can change these rules to customize the component.

Use this property when you display the component on a platform whose guidelines include the active state change for UI components.

elementAttr

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

Selector: dxo-element-attr
Type:

Object

Default Value: {}

jQuery
$(function(){
    $("#speedDialActionContainer").dxSpeedDialAction({
        // ...
        elementAttr: {
            id: "elementId",
            class: "class-name"
        }
    });
});
Angular
HTML
TypeScript
<dx-speed-dial-action ...
    [elementAttr]="{ id: 'elementId', class: 'class-name' }">
</dx-speed-dial-action>
import { DxSpeedDialActionModule } from "devextreme-angular";
// ...
export class AppComponent {
    // ...
}
@NgModule({
    imports: [
        // ...
        DxSpeedDialActionModule
    ],
    // ...
})
Vue
App.vue
<template>
    <DxSpeedDialAction ...
        :element-attr="speedDialActionAttributes">
    </DxSpeedDialAction>
</template>

<script>
import DxSpeedDialAction from 'devextreme-vue/speed-dial-action';

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

import SpeedDialAction from 'devextreme-react/speed-dial-action';

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

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

focusStateEnabled

Specifies whether the UI component can be focused using keyboard navigation.

Type:

Boolean

Default Value: false

hint

Specifies text for a hint that appears when a user pauses on the UI component.

Type:

String

Default Value: undefined

hoverStateEnabled

Specifies whether the UI component changes its state when a user pauses on it.

Type:

Boolean

Default Value: false

icon

Specifies the icon the FAB or speed dial action button displays.

Type:

String

Default Value: ''

index

Allows you to reorder action buttons in the speed dial menu.

Type:

Number

Default Value: 0

The smaller the index, the closer the action button is to the FAB when the speed dial menu is open.

label

Specifies the text label displayed inside the FAB or near the speed dial action button.

Type:

String

Default Value: ''

onClick

A function that is executed when the FAB or speed dial action button is clicked or tapped.

Type:

Function

Function parameters:

Information about the event that caused the function execution.

Object structure:
Name Type Description
actionElement

HTMLElement | jQuery

A DOM element that contains the rendered FAB or speed dial action. It is an HTML Element or a jQuery Element when you use jQuery.

component

SpeedDialAction

The UI component's instance.

element

HTMLElement | jQuery

A DOM element in which the UI component is initialized. It is an HTML Element or a jQuery Element when you use jQuery.

event

Event (jQuery or EventObject)

The event that caused the function to execute. It is an EventObject or a jQuery.Event when you use jQuery.

onContentReady

A function that is executed when the UI component is rendered and each time the component is repainted.

Type:

Function

Function parameters:

Information about the event that caused the function execution.

Object structure:
Name Type Description
component

SpeedDialAction

The UI component's instance.

actionElement

HTMLElement | jQuery

A DOM element that contains the rendered FAB or speed dial action. It is an HTML Element or a jQuery Element when you use jQuery.

element

HTMLElement | jQuery

A DOM element in which the UI component is initialized. It is an HTML Element or a jQuery Element when you use jQuery.

Default Value: null

onDisposing

A function that is executed before the UI component is disposed of.

Type:

Function

Function parameters:

Information about the event.

Object structure:
Name Type Description
element

HTMLElement | jQuery

The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery.

component

SpeedDialAction

The UI component's instance.

Default Value: null

onInitialized

A function used in JavaScript frameworks to save the UI component instance.

Type:

Function

Function parameters:

Information about the event.

Object structure:
Name Type Description
element

HTMLElement | jQuery

The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery.

component

SpeedDialAction

The UI component's instance.

Default Value: null

Angular
app.component.html
app.component.ts
<dx-speed-dial-action ...
    (onInitialized)="saveInstance($event)">
</dx-speed-dial-action>
import { Component } from "@angular/core";
import SpeedDialAction from "devextreme/ui/data_grid";
// ...
export class AppComponent {
    speedDialActionInstance: SpeedDialAction;
    saveInstance (e) {
        this.speedDialActionInstance = e.component;
    }
}
Vue
App.vue (Options API)
App.vue (Composition API)
<template>
    <div>
        <DxSpeedDialAction ...
            @initialized="saveInstance">
        </DxSpeedDialAction>
    </div>
</template>

<script>
import DxSpeedDialAction from 'devextreme-vue/speed-dial-action';

export default {
    components: {
        DxSpeedDialAction
    },
    data: function() {
        return {
            speedDialActionInstance: null
        };
    },
    methods: {
        saveInstance: function(e) {
            this.speedDialActionInstance = e.component;
        }
    }
};
</script>
<template>
    <div>
        <DxSpeedDialAction ...
            @initialized="saveInstance">
        </DxSpeedDialAction>
    </div>
</template>

<script setup>
import DxSpeedDialAction from 'devextreme-vue/speed-dial-action';

let speedDialActionInstance = null;

const saveInstance = (e) => {
    speedDialActionInstance = e.component;
}
</script>
React
App.js
import SpeedDialAction from 'devextreme-react/speed-dial-action';

class App extends React.Component {
    constructor(props) {
        super(props);

        this.saveInstance = this.saveInstance.bind(this);
    }

    saveInstance(e) {
        this.speedDialActionInstance = e.component;
    }

    render() {
        return (
            <div>
                <SpeedDialAction onInitialized={this.saveInstance} />
            </div>
        );
    }
}
See Also
jQuery
  • Get a UI component Instance in jQuery
Angular
  • Get a UI component Instance in Angular
Vue
  • Get a UI component Instance in Vue
React
  • Get a UI component Instance in React

onOptionChanged

A function that is executed after a UI component property is changed.

Type:

Function

Function parameters:

Information about the event.

Object structure:
Name Type Description
value any

The modified property's new value.

previousValue any

The UI component's previous value.

name

String

The modified property if it belongs to the first level. Otherwise, the first-level property it is nested into.

fullName

String

The path to the modified property that includes all parent properties.

element

HTMLElement | jQuery

The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery.

component

SpeedDialAction

The UI component's instance.

Default Value: null

The following example shows how to subscribe to component property changes:

jQuery
index.js
$(function() {
    $("#speedDialActionContainer").dxSpeedDialAction({
        // ...
        onOptionChanged: function(e) {
            if(e.name === "changedProperty") {
                // handle the property change here
            }
        }
    });
});
Angular
app.component.html
app.component.ts
app.module.ts
<dx-speed-dial-action ...
    (onOptionChanged)="handlePropertyChange($event)"> 
</dx-speed-dial-action>
import { Component } from '@angular/core'; 

@Component({ 
    selector: 'app-root', 
    templateUrl: './app.component.html', 
    styleUrls: ['./app.component.css'] 
}) 

export class AppComponent { 
    // ...
    handlePropertyChange(e) {
        if(e.name === "changedProperty") { 
            // handle the property change here
        }
    }
}
import { BrowserModule } from '@angular/platform-browser'; 
import { NgModule } from '@angular/core'; 
import { AppComponent } from './app.component'; 
import { DxSpeedDialActionModule } from 'devextreme-angular'; 

@NgModule({ 
    declarations: [ 
        AppComponent 
    ], 
    imports: [ 
        BrowserModule, 
        DxSpeedDialActionModule 
    ], 
    providers: [ ], 
    bootstrap: [AppComponent] 
}) 

export class AppModule { }  
Vue
App.vue
<template> 
    <DxSpeedDialAction ...
        @option-changed="handlePropertyChange"
    />            
</template> 

<script>  
import 'devextreme/dist/css/dx.light.css'; 
import DxSpeedDialAction from 'devextreme-vue/speed-dial-action'; 

export default { 
    components: { 
        DxSpeedDialAction
    }, 
    // ...
    methods: { 
        handlePropertyChange: function(e) {
            if(e.name === "changedProperty") {
                // handle the property change here
            }
        }
    } 
} 
</script> 
React
App.js
import React from 'react';  
import 'devextreme/dist/css/dx.light.css'; 

import SpeedDialAction from 'devextreme-react/speed-dial-action'; 

const handlePropertyChange = (e) => {
    if(e.name === "changedProperty") {
        // handle the property change here
    }
}

export default function App() { 
    return ( 
        <SpeedDialAction ...
            onOptionChanged={handlePropertyChange}
        />        
    ); 
} 

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

tabIndex

Specifies the number of the element when the Tab key is used for navigating.

Type:

Number

Default Value: 0

The value of this property will be passed to the tabindex attribute of the HTML element that underlies the UI component.

visible

Allows you to hide the FAB from the view or the action from the speed dial menu.

Type:

Boolean

Default Value: true