Skip to content

Commit

Permalink
- Added key to table rows with onClick
Browse files Browse the repository at this point in the history
  • Loading branch information
sophia-massie committed Oct 29, 2024
1 parent daf0dd3 commit 89b664d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion react/src/components/DeleteMapModal/DeleteMapModal.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import { Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';
import { Button, SectionMessage } from '@tacc/core-components';
import styles from './DeleteMapModal.module.css';
import { Project } from '../../types';
import { useDeleteProject } from '../../hooks/projects/';

Expand Down
4 changes: 2 additions & 2 deletions react/src/components/Projects/ProjectListing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ export const ProjectListing: React.FC = () => {
<tbody>
{data?.map((proj) => (
<tr key={proj.id}>
<td onClick={() => navigateToProject(proj.uuid)}>{proj.name}</td>
<td onClick={() => navigateToProject(proj.uuid)}>
<td key={proj.id} onClick={() => navigateToProject(proj.uuid)}>{proj.name}</td>

Check failure on line 51 in react/src/components/Projects/ProjectListing.tsx

View workflow job for this annotation

GitHub Actions / React-Linting

Visible, non-interactive elements with click handlers must have at least one keyboard listener

Check failure on line 51 in react/src/components/Projects/ProjectListing.tsx

View workflow job for this annotation

GitHub Actions / React-Linting

Non-interactive elements should not be assigned mouse or keyboard event listeners

Check failure on line 51 in react/src/components/Projects/ProjectListing.tsx

View workflow job for this annotation

GitHub Actions / React-Linting

Replace `{proj.name}` with `⏎················{proj.name}⏎··············`
<td key={proj.id} onClick={() => navigateToProject(proj.uuid)}>

Check failure on line 52 in react/src/components/Projects/ProjectListing.tsx

View workflow job for this annotation

GitHub Actions / React-Linting

Visible, non-interactive elements with click handlers must have at least one keyboard listener

Check failure on line 52 in react/src/components/Projects/ProjectListing.tsx

View workflow job for this annotation

GitHub Actions / React-Linting

Non-interactive elements should not be assigned mouse or keyboard event listeners
{proj.ds_project?.value.projectId}{' '}
{proj.ds_project?.value.title}
</td>
Expand Down

0 comments on commit 89b664d

Please sign in to comment.