Guest User

Untitled

a guest
Dec 10th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. export const ORDER_COLUMNS = [
  2. { name: 'orderNumber', title: 'Order', width: '10%', type: 'string' },
  3. { name: 'orderType', title: 'Type', width: '10%', type: 'string' }
  4. ];
  5.  
  6. class OrderGridControl extends React.Component {
  7. constructor(props) {
  8. super(props);
  9. this.state = {
  10. orderColumns: ORDER_COLUMNS
  11. };
  12. }
  13. ...
  14.  
  15. }
  16.  
  17. export default OrderGridControl;
  18.  
  19. import {OrderGridControl, ORDER_COLUMNS} from 'component/order-grid-control';
  20.  
  21. class OrderQueryPage extends React.Component {
  22. constructor(props) {
  23. super(props);
  24. this.state = {
  25. orderColumns: ORDER_COLUMNS
  26. };
  27. console.info(this.state.orderColumns);
  28. }
  29.  
  30. ...
  31.  
  32. render() {
  33. return (
  34. <div>
  35. <PropertyGrid gridSetup={this.state.orderColumns} />
  36. </div>
  37. );
  38. }
  39. }
  40.  
  41. import OrderGridControl, { ORDER_COLUMNS } from 'component/order-grid-control';
  42.  
  43. import GridControl, { ORDER_COLUMNS } from 'component/order-grid-control';
Add Comment
Please, Sign In to add comment