Add keyboard activation to the interactive elements and use stable keys. [skip build]
This commit is contained in:
@@ -112,11 +112,11 @@ function SpaceNavSection({
|
||||
{section.items.length > 0 && (
|
||||
<div data-nav-rooms="">
|
||||
<div data-nav-room-list="">
|
||||
{section.items.map((item, index) => {
|
||||
{section.items.map((item) => {
|
||||
if (item.type === 'unjoined-subroom') {
|
||||
return (
|
||||
<UnjoinedSubRoomItem
|
||||
key={`${item.roomId}:${index}`}
|
||||
key={item.roomId}
|
||||
roomId={item.roomId}
|
||||
depth={item.depth}
|
||||
isLast={item.isLast}
|
||||
@@ -127,7 +127,7 @@ function SpaceNavSection({
|
||||
if (item.type === 'subroom') {
|
||||
return (
|
||||
<div
|
||||
key={`${item.roomId}:${index}`}
|
||||
key={item.roomId}
|
||||
data-nav-depth={item.depth}
|
||||
style={{
|
||||
display: 'flex',
|
||||
@@ -158,7 +158,7 @@ function SpaceNavSection({
|
||||
|
||||
return (
|
||||
<RoomNavItem
|
||||
key={`${item.roomId}:${index}`}
|
||||
key={item.roomId}
|
||||
room={room}
|
||||
selected={selectedRoomId === item.roomId}
|
||||
showAvatar={mDirects.has(item.roomId)}
|
||||
|
||||
Reference in New Issue
Block a user