|
@@ -15,9 +15,9 @@ class Table extends Component {
|
|
|
super(props);
|
|
super(props);
|
|
|
console.log('Table props',props);
|
|
console.log('Table props',props);
|
|
|
this.state = {
|
|
this.state = {
|
|
|
- currentTable: props.currentTable || ' ',
|
|
|
|
|
- remark: props.remark || '',
|
|
|
|
|
- columns: props.columns || [],
|
|
|
|
|
|
|
+ currentTable: props.currentTable,
|
|
|
|
|
+ remark: props.remark,
|
|
|
|
|
+ columns: props.columns,
|
|
|
newColName: '',
|
|
newColName: '',
|
|
|
newColType: 'type',
|
|
newColType: 'type',
|
|
|
types: ['ID', 'String', 'Int', 'Float', 'Boolean', 'DateTime'],
|
|
types: ['ID', 'String', 'Int', 'Float', 'Boolean', 'DateTime'],
|
|
@@ -96,7 +96,7 @@ class Table extends Component {
|
|
|
componentWillReceiveProps(next) {
|
|
componentWillReceiveProps(next) {
|
|
|
this.setState({
|
|
this.setState({
|
|
|
currentTable: next.currentTable,
|
|
currentTable: next.currentTable,
|
|
|
- columns: next.columns || [],
|
|
|
|
|
|
|
+ columns: next.columns,
|
|
|
remark: next.remark
|
|
remark: next.remark
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|