Skip to content

Commit 9b55a5d

Browse files
author
Brian Ryu
committed
Accommodate grouping example
1 parent 5556e93 commit 9b55a5d

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

src/.stories/grouping-items/Item/Item.js

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ function Item(props) {
1616
dragging && styles.dragging,
1717
)}
1818
onClick={() => onClick(value)}
19+
tabIndex={0}
1920
>
2021
Item {value}
2122
{shouldRenderItemCountBadge ? <Badge count={selectedItemsCount} /> : null}

src/.stories/grouping-items/Item/Item.scss

+5
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ $badgeBorderColor: #da4553;
2828
border-top: $borderWidth solid #efefef;
2929
box-sizing: border-box;
3030
user-select: none;
31+
outline: none;
3132

3233
color: $color;
3334
font-weight: $fontWeight-regular;
@@ -52,6 +53,10 @@ $badgeBorderColor: #da4553;
5253
border: $borderWidth solid #efefef;
5354
box-shadow: $boxShadow;
5455
}
56+
57+
&:focus {
58+
border: 2px solid lightsteelblue
59+
}
5560
}
5661

5762
.Badge {

src/SortableContainer/index.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -774,9 +774,8 @@ export default function sortableContainer(
774774
const isValidSortingTarget = useDragHandle ? isSortableHandle(target) : target.sortableInfo;
775775

776776
if (
777-
shouldCancelStart(event) ||
778777
(this.manager.active && !this.manager.active.isKeySorting) ||
779-
(!this.manager.active && (keyCode !== KEYCODE.SPACE || !isValidSortingTarget))
778+
(!this.manager.active && (keyCode !== KEYCODE.SPACE || shouldCancelStart(event) || !isValidSortingTarget))
780779
) {
781780
return;
782781
}

0 commit comments

Comments
 (0)