import { inject, observer } from "mobx-react"; import React, { Component } from "react"; import { WeaTableEdit } from "ecCom"; import * as mobx from "mobx"; const toJS = mobx.toJS; @inject("columnSetting") @observer export default class DefineShowItems extends Component { constructor(props) { super(props); } componentDidMount() { this.init(); } init = () => { const { columnSetting } = this.props; columnSetting.loadTabTwoRelatedData(); }; onRowSelect = (sRowKeys, rows, dataIndex, selectedDatas) => { const { columnSetting } = this.props; if (dataIndex === undefined || selectedDatas === undefined) { return; } columnSetting.setEnableRows(selectedDatas.isused); }; render() { const { columnSetting } = this.props, { tabTwoRelatedData } = columnSetting; const { datas, columns, selectedData, loading } = tabTwoRelatedData; return ( columnSetting.setTableEditDatas(e)} tableProps={{ scroll: { y: 400 } }} onRowSelect={(sRowKeys, rows, dataIndex, selectedDatas) => this.onRowSelect(sRowKeys, rows, dataIndex, selectedDatas)} /> ); } }