F 修复文件管理某些情况下未正常刷新的问题

pull/494/head
vapao 2022-05-16 13:26:27 +08:00
parent 1a607acfe5
commit 828c55f859
1 changed files with 7 additions and 0 deletions

View File

@ -38,6 +38,13 @@ class FileManager extends React.Component {
this.fetchFiles()
}
componentDidUpdate(prevProps) {
if (this.props.id !== prevProps.id) {
this.fetchFiles()
this.setState({objects: []})
}
}
columns = [{
title: '名称',
key: 'name',