fix duplicate name/key render warning

This commit is contained in:
dannyrb authored and James A. Petts committed 2020-05-15 14:02:01 +02:00
1 parent e29a777a9f
commit 1107779a63
2 files changed
+2 -1

No files matched your search

@@ -39,7 +39,7 @@ const StudyListTableRow = props => {
return (
<td
key={name}
key={index}
className={classnames(
'px-4 py-2 text-base truncate',
{ 'border-b border-secondary-light': !isExpanded },
@@ -164,6 +164,7 @@ function StudyListContainer({ history, data: studies }) {
};
const tableDataSource = studies
// TOOD: Move sort to DataSourceWrapper?
// TODO: MOTIVATION, this is triggered on every render, even if list/sort does not change
.sort((s1, s2) => {
const noSortApplied = sortBy === '' || !sortBy;
const sortModifier = sortDirection === 'descending' ? 1 : -1;