import {WeaTable} from 'ecCom'
import React, { Component } from 'react'

export default class TestTable extends Component {
  constructor(props) {
    super(props);
    this.state = {
      dataSource: props.dataSource,
      columns: props.columns
    }
  }

  componentWillReceiveProps(nextProps) {
    this.setState({
      dataSource: nextProps.dataSource,
      columns: nextProps.columns
    })
  }
  
  render() {
    const {dataSource, columns} = this.state;

    return (<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@integrationldapBaseSetTestTableComponent`}
      dataSource={dataSource}
      columns={columns}
      pagination={false}
    />)
  }
}