mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-02 23:48:47 +00:00
fix tag list ID bug (#5673)
This commit is contained in:
@@ -91,6 +91,7 @@ class DirentListItem extends React.Component {
|
||||
isOpMenuOpen: false // for mobile
|
||||
};
|
||||
this.tagListTitleID = `tag-list-title-${uuidv4()}`;
|
||||
this.tagListStackedID = `tag-list-stacked-${uuidv4()}`;
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
@@ -751,10 +752,10 @@ class DirentListItem extends React.Component {
|
||||
</Fragment>
|
||||
)}
|
||||
</td>
|
||||
<td className="tag-list-title">
|
||||
<td className="tag-list-title" id={this.tagListTitleID}>
|
||||
{(dirent.type !== 'dir' && dirent.file_tags && dirent.file_tags.length > 0) && (
|
||||
<Fragment>
|
||||
<div id={this.tagListTitleID} className="dirent-item tag-list tag-list-stacked">
|
||||
<div className="dirent-item tag-list tag-list-stacked" id={this.tagListStackedID}>
|
||||
{dirent.file_tags.map((fileTag, index) => {
|
||||
let length = dirent.file_tags.length;
|
||||
return (
|
||||
@@ -762,7 +763,7 @@ class DirentListItem extends React.Component {
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
<UncontrolledTooltip target={this.tagListTitleID} placement="bottom">
|
||||
<UncontrolledTooltip target={this.tagListStackedID} placement="bottom">
|
||||
{tagTitle}
|
||||
</UncontrolledTooltip>
|
||||
</Fragment>
|
||||
|
Reference in New Issue
Block a user