import {
    inject,
    observer
} from 'mobx-react'
import {
    WeaTableNew
} from 'comsMobx'
const WeaTable = WeaTableNew.WeaTable;

@inject('hrmRecruitPlan') //todo
@observer
export default class SubTable extends React.Component {
    constructor(props) {
        super(props);
    }

    componentDidMount() {
        this.props.hrmRecruitPlan.getTableInfo();
    }

    render() {
        const {
            hrmRecruitPlan,
        } = this.props, {
            subTable,
            onOperatesClick,
        } = hrmRecruitPlan, {
            tableStore
        } = subTable;

        return (
            <WeaTable 
                comsWeaTableStore={tableStore}
                hasOrder={true}
                needScroll={true}
                onOperatesClick={(record, rowIndex, operate) => onOperatesClick(record, rowIndex, operate)}
            />
        )

    }
}