fix: Fix table height with hint

Fix table height with hint

Change-Id: I89f9db8d93590922ab02f6ad025c9a253bc56034
This commit is contained in:
zhangjingwei 2021-08-10 21:56:24 +08:00 committed by Jingwei.Zhang
parent 923fdf003b
commit bc9b43e08c
9 changed files with 14 additions and 12 deletions

View File

@ -759,6 +759,7 @@ export default class BaseList extends React.Component {
this.setRefreshdataTimerAuto();
}
this.updateHintsByDatas(datas);
this.setTableHeight();
return datas;
};
@ -916,6 +917,7 @@ export default class BaseList extends React.Component {
updateHintsByOthers() {
if (this.updateHints) {
this.updateHints();
setTimeout(this.setTableHeight, 0);
this.setState({
newHints: true,
});

View File

@ -48,7 +48,7 @@ const actions = [
},
];
class ProjectInfo extends Component {
export class ProjectInfo extends Component {
componentDidMount() {
this.props.store.getProjectInfoData();
}

View File

@ -81,7 +81,7 @@ const volumeColors = {
other: { color: '#F6B23D', text: t('Others') },
};
class virtualResourceInfo extends Component {
export class virtualResourceInfo extends Component {
componentDidMount() {
this.props.store.getVirtualResource();
}

View File

@ -37,7 +37,7 @@ export const color = {
dangerColor: '#D93126',
};
class ResourceCircle extends Component {
export class ResourceCircle extends Component {
constructor(props) {
super(props);
this.store = globalHypervisorStore;

View File

@ -18,7 +18,7 @@ import { inject, observer } from 'mobx-react';
import { UpOutlined, DownOutlined } from '@ant-design/icons';
import styles from '../style.less';
class ProjectInfo extends Component {
export class ProjectInfo extends Component {
constructor(props) {
super(props);
this.state = {

View File

@ -27,7 +27,7 @@ const colors = {
full: { color: '#E8684A', text: t('Full') },
};
class QuotaOverview extends Component {
export class QuotaOverview extends Component {
constructor(props) {
super(props);
this.state = {

View File

@ -27,9 +27,7 @@ import { ImageStore } from 'stores/glance/image';
import { getOptions } from 'utils/index';
import actionConfigs from './actions';
@inject('rootStore')
@observer
export default class Image extends Base {
export class Image extends Base {
init() {
this.store = new ImageStore();
this.downloadStore = new ImageStore();
@ -208,3 +206,5 @@ export default class Image extends Base {
return filters;
}
}
export default inject('rootStore')(observer(Image));

View File

@ -27,7 +27,7 @@ import { NoSetValue, getOptionsWithNoset, getOptions } from 'utils/index';
import { ProjectStore } from 'stores/keystone/project';
import { projectTableOptions } from 'resources/project';
class CreateForm extends FormAction {
export class CreateForm extends FormAction {
init() {
this.store = globalImageStore;
this.projectStore = new ProjectStore();

View File

@ -18,9 +18,7 @@ import globalSecurityGroupRuleStore from 'stores/neutron/security-rule';
import { filterParams, getSelfColumns } from 'resources/security-group-rule';
import actionConfigs from './actions';
@inject('rootStore')
@observer
export default class Rule extends Base {
export class Rule extends Base {
init() {
this.store = globalSecurityGroupRuleStore;
}
@ -55,3 +53,5 @@ export default class Rule extends Base {
this.list.silent = false;
}
}
export default inject('rootStore')(observer(Rule));