Skip to content

Commit ab05126

Browse files
committed
Apply ESLint autofix to examples
1 parent e4a8903 commit ab05126

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

examples/drag-handle.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ class SortableComponent extends Component {
3333
items: ['Item 1', 'Item 2', 'Item 3', 'Item 4', 'Item 5', 'Item 6'],
3434
};
3535
onSortEnd = ({oldIndex, newIndex}) => {
36-
let {items} = this.state;
36+
const {items} = this.state;
3737

3838
this.setState({
3939
items: arrayMove(items, oldIndex, newIndex),
4040
});
4141
};
4242
render() {
43-
let {items} = this.state;
43+
const {items} = this.state;
4444

4545
return <SortableList items={items} onSortEnd={this.onSortEnd} useDragHandle={true} />;
4646
}

examples/infinite-list.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ class SortableComponent extends Component {
3333
],
3434
};
3535
onSortEnd = ({oldIndex, newIndex}) => {
36-
let {items} = this.state;
36+
const {items} = this.state;
3737

3838
this.setState({
3939
items: arrayMove(items, oldIndex, newIndex),
4040
});
4141
};
4242
render() {
43-
let {items} = this.state;
43+
const {items} = this.state;
4444

4545
return <SortableList items={items} onSortEnd={this.onSortEnd} />;
4646
}

examples/virtual-list.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const SortableItem = SortableElement(({value}) => {
1313

1414
class VirtualList extends Component {
1515
render() {
16-
let {items} = this.props;
16+
const {items} = this.props;
1717

1818
return (
1919
<List
@@ -22,7 +22,7 @@ class VirtualList extends Component {
2222
}}
2323
rowHeight={({index}) => items[index].height}
2424
rowRenderer={({index}) => {
25-
let {value} = items[index];
25+
const {value} = items[index];
2626
return <SortableItem index={index} value={value} />;
2727
}}
2828
rowCount={items.length}
@@ -53,21 +53,21 @@ class SortableComponent extends Component {
5353
};
5454
onSortEnd = ({oldIndex, newIndex}) => {
5555
if (oldIndex !== newIndex) {
56-
let {items} = this.state;
56+
const {items} = this.state;
5757

5858
this.setState({
5959
items: arrayMove(items, oldIndex, newIndex),
6060
});
6161

6262
// We need to inform React Virtualized that the items have changed heights
63-
let instance = this.SortableList.getWrappedInstance();
63+
const instance = this.SortableList.getWrappedInstance();
6464

6565
instance.List.recomputeRowHeights();
6666
instance.forceUpdate();
6767
}
6868
};
6969
render() {
70-
let {items} = this.state;
70+
const {items} = this.state;
7171

7272
return (
7373
<SortableList

0 commit comments

Comments
 (0)