feat: update refresh detail top without silence
1. For some list tab in the detail page, when submit actions in the list tab, the detail info and the list tab is better to refresh without silence. 2. Refresh the whole user detail page when the set/remove default project of the user Change-Id: I2fcbe8d79eb90250ed05509540bb2e29a310755d
This commit is contained in:
parent
968e2cf577
commit
c356e21478
@ -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) => {
|
||||
|
@ -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) => {
|
||||
|
@ -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 || {};
|
||||
|
Loading…
Reference in New Issue
Block a user