Merge "feat: update refresh detail top without silence"

This commit is contained in:
Zuul 2023-11-20 10:52:01 +00:00 committed by Gerrit Code Review
commit 6e5b257191
3 changed files with 11 additions and 3 deletions

View File

@ -443,6 +443,10 @@ export default class BaseList extends React.Component {
return null;
}
get refreshDetailDataWithSilence() {
return true;
}
setRefreshDataTimerTransition = () => {
this.stopRefreshAuto();
if (this.dataTimerTransition) {
@ -930,7 +934,7 @@ export default class BaseList extends React.Component {
refreshDetailData = () => {
const { refreshDetail } = this.props;
refreshDetail && refreshDetail();
refreshDetail && refreshDetail(this.refreshDetailDataWithSilence);
};
handleRefresh = (force) => {

View File

@ -294,8 +294,8 @@ export default class DetailBase extends React.Component {
this.fetchData(params, silent);
};
refreshDetailByTab = () => {
this.fetchDataWithPolicy(true);
refreshDetailByTab = (silence = true) => {
this.fetchDataWithPolicy(silence);
};
refreshDetailByAction = (silence) => {

View File

@ -60,6 +60,10 @@ export class Projects extends Base {
return this.inUserDetail;
}
get refreshDetailDataWithSilence() {
return !this.inUserDetail;
}
getUserProjectRole = (record) => {
// return [{role, groups}]
const { users = {}, groups = {} } = record || {};