1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-10 03:11:07 +00:00

fix dirent key={index} bug (#6754)

This commit is contained in:
Michael An
2024-09-12 15:00:42 +08:00
committed by GitHub
parent ac37e9dc31
commit 631bafe4b1
3 changed files with 6 additions and 2 deletions

View File

@@ -691,7 +691,7 @@ class DirentListView extends React.Component {
return (
<DirentListItem
ref={this.setDirentItemRef(index)}
key={index}
key={dirent.name} // dirent.id is not unique, so use dirent.name as key
dirent={dirent}
path={this.props.path}
repoID={this.props.repoID}