File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
src/features/instance/databases Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -158,11 +158,11 @@ export function BrowseDataTableView() {
158158 ) ;
159159 } ;
160160
161- const onCSVDataAdded = ( ) => {
161+ const onCSVDataAdded = ( message : string ) => {
162162 void refetchDescribeTableQueryOptions ( ) ;
163163 void refetchSearchByValueOptions ( ) ;
164164 setIsImportCSVModalOpen ( false ) ;
165- toast . success ( 'Record(s) added successfully' ) ;
165+ toast . success ( ` ${ message } . Please wait a few moments then refresh the table.` ) ;
166166 } ;
167167
168168 const onRowClick = ( rowData : Row < Record < string , unknown > > ) => {
Original file line number Diff line number Diff line change @@ -31,13 +31,13 @@ export function ImportCSVModal({
3131} : {
3232 setIsModalOpen : ( open : boolean ) => void ;
3333 isModalOpen : boolean ;
34- onSaveChanges : ( ) => void ;
34+ onSaveChanges : ( message : string ) => void ;
3535 database : string ;
3636 table : string ;
3737} ) {
3838 const [ selectedCSVFile , setSelectedCSVFile ] = useState < File | null > ( null ) ;
3939 const instanceParams = useInstanceClientIdParams ( ) ;
40- const { mutate : addCSVData , isLoading : isAddCSVDataPending } = useAddCSVDataMutation ( ) ;
40+ const { mutate : addCSVData , isPending : isAddCSVDataPending } = useAddCSVDataMutation ( ) ;
4141
4242 const onFileChange = ( e : React . ChangeEvent < HTMLInputElement > ) => {
4343 if ( ! e . target . files ) return ;
@@ -76,8 +76,10 @@ export function ImportCSVModal({
7676 ...instanceParams ,
7777 } ,
7878 {
79- onSuccess : ( ) => {
80- onSaveChanges ( ) ;
79+ onSuccess : ( { message } : { message : string } ) => {
80+ form . reset ( ) ;
81+ setSelectedCSVFile ( null ) ;
82+ onSaveChanges ( message ) ;
8183 } ,
8284 }
8385 ) ;
You can’t perform that action at this time.
0 commit comments