Skip to content

Commit 1c1efa8

Browse files
authored
Revert "[0.66] Flatlist keyboard navigation: Mouse can move selection (#1269)"
This reverts commit 6496462.
1 parent aebbcf1 commit 1c1efa8

File tree

3 files changed

+1
-22
lines changed

3 files changed

+1
-22
lines changed

Libraries/Lists/FlatList.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -369,19 +369,6 @@ class FlatList<ItemT> extends React.PureComponent<Props<ItemT>, void> {
369369
}
370370
}
371371

372-
// [TODO(macOS GH#750)
373-
/**
374-
* Move selection to the specified index
375-
*
376-
* @platform macos
377-
*/
378-
selectRowAtIndex(index: number) {
379-
if (this._listRef) {
380-
this._listRef.selectRowAtIndex(index);
381-
}
382-
}
383-
// ]TODO(macOS GH#750)
384-
385372
/**
386373
* Provides a handle to the underlying scroll responder.
387374
*/

Libraries/Lists/VirtualizedList.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -592,10 +592,6 @@ class VirtualizedList extends React.PureComponent<Props, State> {
592592
this.scrollToOffset({offset: newOffset});
593593
}
594594
}
595-
596-
selectRowAtIndex(rowIndex: number) {
597-
this._selectRowAtIndex(rowIndex);
598-
}
599595
// ]TODO(macOS GH#774)
600596

601597
recordInteraction() {

packages/rn-tester/js/examples/FlatList/FlatListExample.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ type State = {|
6161
fadingEdgeLength: number,
6262
onPressDisabled: boolean,
6363
textSelectable: boolean,
64-
enableSelectionOnKeyPress: boolean, // TODO(macOS GH#774)
64+
enableSelectionOnKeyPress: boolean, // TODO(macOS GH#774)]
6565
|};
6666

6767
class FlatListExample extends React.PureComponent<Props, State> {
@@ -303,10 +303,6 @@ class FlatListExample extends React.PureComponent<Props, State> {
303303
_pressItem = (key: string) => {
304304
this._listRef && this._listRef.recordInteraction();
305305
const index = Number(key);
306-
// [TODO(macOS GH#774)
307-
if (this.state.enableSelectionOnKeyPress) {
308-
this._listRef && this._listRef.selectRowAtIndex(index);
309-
} // ]TODO(macOS GH#774)
310306
const itemState = pressItem(this.state.data[index]);
311307
this.setState(state => ({
312308
...state,

0 commit comments

Comments
 (0)