weaver_trunk_cli/pc4mobx/hrm/public/valhalla/components/Table.js

33 lines
671 B
JavaScript

import {
observer
} from 'mobx-react';
import {
WeaTableNew,
} from 'comsMobx';
const WeaTable = WeaTableNew.WeaTable;
@observer
export default class Table extends React.Component {
render() {
const {
store
} = this.props, {
tableProps,
tableStore,
onOperatesClick,
reRenderColumns,
} = store;
const width = tableStore.columns.filter(c => c.display === "true").length * 50;
return (
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@j8g47a`}
{...tableProps}
comsWeaTableStore={tableStore}
onOperatesClick={onOperatesClick}
getColumns={reRenderColumns}
tableWidth={width}
/>
);
}
}