JavaScript/jQuery SpeedDialAction Options
This section describes properties that configure the SpeedDialAction UI component's contents, behavior, and appearance.
accessKey
The value of this property will be passed to the accesskey
attribute of the HTML element that underlies the UI component.
elementAttr
Specifies the global attributes to be attached to the UI component's container element.
jQuery
$(function(){ $("#speedDialActionContainer").dxSpeedDialAction({ // ... elementAttr: { id: "elementId", class: "class-name" } }); });
Angular
<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
<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
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;
onClick
Name | Type | Description |
---|---|---|
actionElement |
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 |
The UI component's instance. |
|
element |
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 a dxEvent or a jQuery.Event when you use jQuery. |
onContentReady
A function that is executed when the UI component's content is ready and each time the content is changed.
Name | Type | Description |
---|---|---|
element |
A DOM element in which the UI component is initialized. It is an HTML Element or a jQuery Element when you use jQuery. |
|
component |
The UI component's instance. |
|
actionElement |
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. |
|
model |
Model data. Available only when using Knockout. |
onDisposing
A function that is executed before the UI component is disposed of.
Name | Type | Description |
---|---|---|
component |
The UI component's instance. |
|
element |
The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery. |
|
model |
Model data. Available only if you use Knockout. |
onInitialized
Name | Type | Description |
---|---|---|
component |
The UI component's instance. |
|
element |
The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery. |
onOptionChanged
Name | Type | Description |
---|---|---|
model |
Model data. Available only if you use Knockout. |
|
fullName |
The path to the modified property that includes all parent properties. |
|
element |
The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery. |
|
component |
The UI component's instance. |
|
name |
The modified property if it belongs to the first level. Otherwise, the first-level property it is nested into. |
|
value | any |
The modified property's new value. |
The following example shows how to subscribe to component property changes:
jQuery
$(function() { $("#speedDialActionContainer").dxSpeedDialAction({ // ... onOptionChanged: function(e) { if(e.name === "changedProperty") { // handle the property change here } } }); });
Angular
<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
<template> <DxSpeedDialAction ... @option-changed="handlePropertyChange" /> </template> <script> import 'devextreme/dist/css/dx.common.css'; 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
import React from 'react'; import 'devextreme/dist/css/dx.common.css'; 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
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.
DevExpress.config({ rtlEnabled: true });
tabIndex
The value of this property will be passed to the tabindex
attribute of the HTML element that underlies the UI component.