-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.js
More file actions
26 lines (25 loc) · 720 Bytes
/
index.js
File metadata and controls
26 lines (25 loc) · 720 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
const actions = [
{ id: 1, text: 'My profile', icon: 'user' },
{ id: 2, text: 'Messages', icon: 'email' },
{ id: 3, text: 'Contacts', icon: 'group' },
{ id: 4, text: 'Log out', icon: 'runner' },
];
$(() => {
const dropDownButton = $('#myDropDownButton').dxDropDownButton({
text: 'Sandra Johnson',
icon: 'user',
displayExpr: 'text',
items: actions,
keyExpr: 'id',
onItemClick: (e) => {
DevExpress.ui.notify(`${e.itemData.text} was clicked`, 'info', 2000);
},
splitButton: true,
onButtonClick: () => {
DevExpress.ui.notify('Main button was clicked', 'success', 2000);
},
dropDownOptions: {
height: 150,
},
}).dxDropDownButton('instance');
});