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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -27,9 +27,7 @@ import { ImageStore } from 'stores/glance/image';
import { getOptions } from 'utils/index'; import { getOptions } from 'utils/index';
import actionConfigs from './actions'; import actionConfigs from './actions';
@inject('rootStore') export class Image extends Base {
@observer
export default class Image extends Base {
init() { init() {
this.store = new ImageStore(); this.store = new ImageStore();
this.downloadStore = new ImageStore(); this.downloadStore = new ImageStore();
@ -208,3 +206,5 @@ export default class Image extends Base {
return filters; 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 { ProjectStore } from 'stores/keystone/project';
import { projectTableOptions } from 'resources/project'; import { projectTableOptions } from 'resources/project';
class CreateForm extends FormAction { export class CreateForm extends FormAction {
init() { init() {
this.store = globalImageStore; this.store = globalImageStore;
this.projectStore = new ProjectStore(); 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 { filterParams, getSelfColumns } from 'resources/security-group-rule';
import actionConfigs from './actions'; import actionConfigs from './actions';
@inject('rootStore') export class Rule extends Base {
@observer
export default class Rule extends Base {
init() { init() {
this.store = globalSecurityGroupRuleStore; this.store = globalSecurityGroupRuleStore;
} }
@ -55,3 +53,5 @@ export default class Rule extends Base {
this.list.silent = false; this.list.silent = false;
} }
} }
export default inject('rootStore')(observer(Rule));