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

View File

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

View File

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