Skip to content

Commit 553de03

Browse files
update formatting
1 parent 8aef6e1 commit 553de03

File tree

5 files changed

+84
-84
lines changed

5 files changed

+84
-84
lines changed

angular/src/app/app.component.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<dx-drop-down-button
2-
text="Sandra Johnson"
3-
icon="user"
4-
[items]="actions"
5-
keyExpr="id"
6-
displayExpr="text"
7-
(onItemClick)="logAction($event)"
8-
[splitButton]="true"
9-
(onButtonClick)="logButtonClick()"
10-
[dropDownOptions]="dropDownOptions"
2+
text="Sandra Johnson"
3+
icon="user"
4+
[items]="actions"
5+
keyExpr="id"
6+
displayExpr="text"
7+
(onItemClick)="logAction($event)"
8+
[splitButton]="true"
9+
(onButtonClick)="logButtonClick()"
10+
[dropDownOptions]="dropDownOptions"
1111
>
1212
</dx-drop-down-button>

angular/src/app/app.component.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
import { Component } from '@angular/core';
22

33
@Component({
4-
selector: 'app-root',
5-
templateUrl: './app.component.html',
6-
styleUrls: ['./app.component.css'],
4+
selector: 'app-root',
5+
templateUrl: './app.component.html',
6+
styleUrls: ['./app.component.css']
77
})
88
export class AppComponent {
9-
actions: Array<{ id: Number; text: String; icon: String }> = [
10-
{ id: 1, text: 'My profile', icon: 'user' },
11-
{ id: 2, text: 'Messages', icon: 'email' },
12-
{ id: 3, text: 'Contacts', icon: 'group' },
13-
{ id: 4, text: 'Log out', icon: 'runner' },
14-
];
15-
dropDownOptions = {
16-
height: 150,
17-
};
9+
actions: Array<{ id: Number; text: String; icon: String }> = [
10+
{ id: 1, text: 'My profile', icon: 'user' },
11+
{ id: 2, text: 'Messages', icon: 'email' },
12+
{ id: 3, text: 'Contacts', icon: 'group' },
13+
{ id: 4, text: 'Log out', icon: 'runner' }
14+
];
15+
dropDownOptions = {
16+
height: 150
17+
};
1818

19-
logAction(e) {
20-
console.log(e.itemData.text + ' was clicked');
21-
}
19+
logAction(e) {
20+
console.log(e.itemData.text + ' was clicked');
21+
}
2222

23-
logButtonClick() {
24-
console.log('Main button was clicked');
25-
}
23+
logButtonClick() {
24+
console.log('Main button was clicked');
25+
}
2626
}

jquery/index.js

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
const actions = [
2-
{ id: 1, text: 'My profile', icon: 'user' },
3-
{ id: 2, text: 'Messages', icon: 'email' },
4-
{ id: 3, text: 'Contacts', icon: 'group' },
5-
{ id: 4, text: 'Log out', icon: 'runner' },
2+
{ id: 1, text: 'My profile', icon: 'user' },
3+
{ id: 2, text: 'Messages', icon: 'email' },
4+
{ id: 3, text: 'Contacts', icon: 'group' },
5+
{ id: 4, text: 'Log out', icon: 'runner' }
66
];
77

88
$(function () {
9-
$('#myDropDownButton').dxDropDownButton({
10-
text: 'Sandra Johnson',
11-
icon: 'user',
12-
displayExpr: 'text',
13-
items: actions,
14-
keyExpr: 'id',
15-
onItemClick: function (e) {
16-
console.log(e.itemData.text + ' was clicked');
17-
},
18-
splitButton: true,
19-
onButtonClick: function () {
20-
console.log('Main button was clicked');
21-
},
22-
dropDownOptions: {
23-
height: 150,
24-
},
25-
});
9+
$('#myDropDownButton').dxDropDownButton({
10+
text: 'Sandra Johnson',
11+
icon: 'user',
12+
displayExpr: 'text',
13+
items: actions,
14+
keyExpr: 'id',
15+
onItemClick: function (e) {
16+
console.log(e.itemData.text + ' was clicked');
17+
},
18+
splitButton: true,
19+
onButtonClick: function () {
20+
console.log('Main button was clicked');
21+
},
22+
dropDownOptions: {
23+
height: 150
24+
}
25+
});
2626
});

react/src/App.js

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,37 +6,37 @@ import 'devextreme/dist/css/dx.light.css';
66
import DropDownButton from 'devextreme-react/drop-down-button';
77

88
const actions = [
9-
{ id: 1, text: 'My profile', icon: 'user' },
10-
{ id: 2, text: 'Messages', icon: 'email' },
11-
{ id: 3, text: 'Contacts', icon: 'group' },
12-
{ id: 4, text: 'Log out', icon: 'runner' },
9+
{ id: 1, text: 'My profile', icon: 'user' },
10+
{ id: 2, text: 'Messages', icon: 'email' },
11+
{ id: 3, text: 'Contacts', icon: 'group' },
12+
{ id: 4, text: 'Log out', icon: 'runner' }
1313
];
1414
const dropDownOptions = {
15-
height: 150,
15+
height: 150
1616
};
1717
class App extends React.Component {
18-
logAction(e) {
19-
console.log(e.itemData.text + ' was clicked');
20-
}
18+
logAction(e) {
19+
console.log(e.itemData.text + ' was clicked');
20+
}
2121

22-
logButtonClick() {
23-
console.log('Main button was clicked');
24-
}
22+
logButtonClick() {
23+
console.log('Main button was clicked');
24+
}
2525

26-
render() {
27-
return (
28-
<DropDownButton
29-
text="Sandra Johnson"
30-
icon="user"
31-
items={actions}
32-
keyExpr="id"
33-
displayExpr="text"
34-
onItemClick={this.logAction}
35-
splitButton={true}
36-
onButtonClick={this.logButtonClick}
37-
dropDownOptions={dropDownOptions}
38-
/>
39-
);
40-
}
26+
render() {
27+
return (
28+
<DropDownButton
29+
text="Sandra Johnson"
30+
icon="user"
31+
items={actions}
32+
keyExpr="id"
33+
displayExpr="text"
34+
onItemClick={this.logAction}
35+
splitButton={true}
36+
onButtonClick={this.logButtonClick}
37+
dropDownOptions={dropDownOptions}
38+
/>
39+
);
40+
}
4141
}
4242
export default App;

vue/src/App.vue

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
import DxDropDownButton from 'devextreme-vue/drop-down-button';
1717
1818
const actions = [
19-
{ id: 1, text: "My profile", icon: "user" },
20-
{ id: 2, text: "Messages", icon: "email" },
21-
{ id: 3, text: "Contacts", icon: "group" },
22-
{ id: 4, text: "Log out", icon: "runner" }
19+
{ id: 1, text: 'My profile', icon: 'user' },
20+
{ id: 2, text: 'Messages', icon: 'email' },
21+
{ id: 3, text: 'Contacts', icon: 'group' },
22+
{ id: 4, text: 'Log out', icon: 'runner' }
2323
];
2424
2525
export default {
@@ -30,17 +30,17 @@ export default {
3030
return {
3131
actions,
3232
dropDownOptions: {
33-
height: 150,
33+
height: 150
3434
}
35-
}
35+
};
3636
},
3737
methods: {
3838
logAction(e) {
39-
console.log(e.itemData.text + " was clicked");
39+
console.log(e.itemData.text + ' was clicked');
4040
},
4141
logButtonClick() {
42-
console.log("Main button was clicked");
42+
console.log('Main button was clicked');
4343
}
4444
}
45-
}
46-
</script>
45+
};
46+
</script>

0 commit comments

Comments
 (0)