mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
refactor: suggested changes
This commit is contained in:
parent
5c099297a4
commit
10b6b9e5ad
@ -339,15 +339,11 @@ class _SelectionMenuWidgetState extends State<SelectionMenuWidget> {
|
|||||||
newSelectedIndex -= 1;
|
newSelectedIndex -= 1;
|
||||||
} else if (event.logicalKey == LogicalKeyboardKey.arrowDown) {
|
} else if (event.logicalKey == LogicalKeyboardKey.arrowDown) {
|
||||||
newSelectedIndex += 1;
|
newSelectedIndex += 1;
|
||||||
}else if (event.logicalKey == LogicalKeyboardKey.tab) {
|
} else if (event.logicalKey == LogicalKeyboardKey.tab) {
|
||||||
newSelectedIndex += widget.maxItemInRow;
|
newSelectedIndex += widget.maxItemInRow;
|
||||||
var currRow = (newSelectedIndex) % widget.maxItemInRow;
|
var currRow = (newSelectedIndex) % widget.maxItemInRow;
|
||||||
if (newSelectedIndex >= _showingItems.length) {
|
if (newSelectedIndex >= _showingItems.length) {
|
||||||
if (currRow + 1 >= widget.maxItemInRow) {
|
newSelectedIndex = (currRow + 1) % widget.maxItemInRow;
|
||||||
newSelectedIndex = 0;
|
|
||||||
} else {
|
|
||||||
newSelectedIndex = (currRow + 1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user