Skip to content

Commit 7355117

Browse files
add
1 parent b752d10 commit 7355117

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

src/components/TableView/TableView.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ type Props = {
55
data: array
66
}
77
export default class TableView extends React.Component {
8-
props: props
8+
props: Props
99
constructor (props) {
1010
super(props)
1111
this.onChange = this.onChange.bind(this)
1212
}
13-
onChange(pagination, filters, sorter) {
14-
console.log('params', pagination, filters, sorter);
13+
onChange (pagination, filters, sorter) {
14+
console.log('params', pagination, filters, sorter)
1515
}
1616
render () {
1717
return (

src/components/WarnView/WarnView.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,62 +5,62 @@ const columns = [{
55
dataIndex: 'name',
66
filters: [{
77
text: 'Joe',
8-
value: 'Joe',
8+
value: 'Joe'
99
}, {
1010
text: 'Jim',
11-
value: 'Jim',
11+
value: 'Jim'
1212
}, {
1313
text: 'Submenu',
1414
value: 'Submenu',
1515
children: [{
1616
text: 'Green',
17-
value: 'Green',
17+
value: 'Green'
1818
}, {
1919
text: 'Black',
20-
value: 'Black',
21-
}],
20+
value: 'Black'
21+
}]
2222
}],
2323
onFilter: (value, record) => record.name.indexOf(value) === 0,
24-
sorter: (a, b) => a.name.length - b.name.length,
24+
sorter: (a, b) => a.name.length - b.name.length
2525
}, {
2626
title: 'Age',
2727
dataIndex: 'age',
28-
sorter: (a, b) => a.age - b.age,
28+
sorter: (a, b) => a.age - b.age
2929
}, {
3030
title: 'Address',
3131
dataIndex: 'address',
3232
filters: [{
3333
text: 'London',
34-
value: 'London',
34+
value: 'London'
3535
}, {
3636
text: 'New York',
37-
value: 'New York',
37+
value: 'New York'
3838
}],
3939
filterMultiple: false,
4040
onFilter: (value, record) => record.address.indexOf(value) === 0,
41-
sorter: (a, b) => a.address.length - b.address.length,
41+
sorter: (a, b) => a.address.length - b.address.length
4242
}]
4343

4444
const data = [{
4545
key: '1',
4646
name: 'John Brown',
4747
age: 32,
48-
address: 'New York No. 1 Lake Park',
48+
address: 'New York No. 1 Lake Park'
4949
}, {
5050
key: '2',
5151
name: 'Jim Green',
5252
age: 42,
53-
address: 'London No. 1 Lake Park',
53+
address: 'London No. 1 Lake Park'
5454
}, {
5555
key: '3',
5656
name: 'Joe Black',
5757
age: 32,
58-
address: 'Sidney No. 1 Lake Park',
58+
address: 'Sidney No. 1 Lake Park'
5959
}, {
6060
key: '4',
6161
name: 'Jim Red',
6262
age: 32,
63-
address: 'London No. 2 Lake Park',
63+
address: 'London No. 2 Lake Park'
6464
}]
6565
export default class WarnView extends React.Component {
6666

0 commit comments

Comments
 (0)