11import React , { PureComponent } from 'react'
22import PropTypes from 'prop-types'
33import { withI18n , Trans } from '@lingui/react'
4- import { Form , Modal , Input , Icon , Button , Select } from 'antd'
4+ import { Form , notification , Input , Icon , Button , Select } from 'antd'
55import ColumnInput from './ColumnInput'
66
77let id = 0
@@ -55,8 +55,8 @@ class DynamicAddTableForm extends React.Component {
5555 console . log ( 'Merged values:' , keys . map ( key => columns [ key ] ) )
5656
5757 const table = values . table_name
58- const names = values . columns . map ( c => c . name )
59- const types = values . columns . map ( c => c . type )
58+ const names = values . columns . map ( c => c . name ) . filter ( i => i !== null )
59+ const types = values . columns . map ( c => c . type ) . filter ( i => i !== null )
6060
6161 // return
6262 const { data, success } = await this . props . createTable ( {
@@ -66,14 +66,9 @@ class DynamicAddTableForm extends React.Component {
6666 } )
6767
6868 if ( success ) {
69- Modal . success ( {
70- title : i18n . t `Create Table Success!` ,
71- content : (
72- < div >
73- < div > { data . table } created</ div >
74- </ div >
75- ) ,
76- okText : i18n . t `好的` ,
69+ notification . success ( {
70+ message : i18n . t `Create Table Success!` ,
71+ description : `${ data . table } created` ,
7772 } )
7873
7974 // reset form
0 commit comments