Skip to content

Commit cf1a965

Browse files
authored
Update list-form.tsx
1 parent f358fe7 commit cf1a965

File tree

1 file changed

+11
-0
lines changed
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components

1 file changed

+11
-0
lines changed

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/list-form.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,17 @@ export const CreateListingsForm: React.FC<CreateListingsFormProps> = ({
549549
? form.setValue("selected", undefined)
550550
: form.setValue("selected", nft)
551551
}
552+
onKeyDown={(e) => {
553+
if (e.key === 'Enter' || e.key === ' ') {
554+
e.preventDefault();
555+
isSelected(nft)
556+
? form.setValue("selected", undefined)
557+
: form.setValue("selected", nft);
558+
}
559+
}}
560+
tabIndex={0}
561+
role="button"
562+
aria-pressed={isSelected(nft)}
552563
>
553564
<NFTMediaWithEmptyState
554565
metadata={nft.metadata}

0 commit comments

Comments
 (0)