Skip to content

Commit

Permalink
Merge pull request #1523 from culturecreates/bugfix/issue-1513
Browse files Browse the repository at this point in the history
fix: made data-cy for table cell static. closes #1513
  • Loading branch information
AbhishekPAnil authored Jan 22, 2025
2 parents 3b1964d + 303d05a commit 04780b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/components/DraggableTree/DraggableTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const DraggableTable = ({ data, setData, fallbackStatus, setFallbackStatus, tran
dataIndex: contentLanguageKeyMap[language],
key: contentLanguageKeyMap[language],
editable: true,
['data-cy']: `taxonomy-concept-row-more-btn-${language}`,
['data-cy']: `taxonomy-concept-row-more-btn`,
}));

const moveRow = useCallback(
Expand Down
7 changes: 1 addition & 6 deletions src/components/DraggableTree/EditableCell.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,8 @@ const EditableCell = ({ title, editable, children, dataIndex, record, handleSave
);
}

let dataCy = ``;
if (typeof value === 'string') {
dataCy = `taxonomy-concept-cell-${value.replace(/\s+/g, '')}-${recordKey}`;
}

return (
<td {...restProps} data-cy={dataCy}>
<td {...restProps} data-cy={'taxonomy-concept-cell-' + dataIndex}>
{editing ? (
<TextArea
ref={inputRef}
Expand Down

0 comments on commit 04780b3

Please sign in to comment.