File tree 2 files changed +13
-1
lines changed
src/pods/import-collection
2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change
1
+ .text-info {
2
+ background-color : var (--background-dialog );
3
+ padding-top : var (--space-md );
4
+ display : flex;
5
+ justify-content : center;
6
+ }
7
+
1
8
.table-name ,
2
9
.json-textarea {
3
10
background-color : var (--background-dialog );
Original file line number Diff line number Diff line change @@ -76,6 +76,11 @@ export const ImportPanel: React.FC<ImportPanelProps> = props => {
76
76
const handleChangeTableName = ( e : React . ChangeEvent < HTMLInputElement > ) => {
77
77
const tableName : string = e . currentTarget . value ;
78
78
setEditTable ( { ...editTable , tableName } ) ;
79
+ if ( e . currentTarget . value . length === 0 ) {
80
+ setJsonError ( 'Name cannot be empty' ) ;
81
+ } else {
82
+ setJsonError ( null ) ;
83
+ }
79
84
} ;
80
85
81
86
return (
@@ -91,7 +96,7 @@ export const ImportPanel: React.FC<ImportPanelProps> = props => {
91
96
/>
92
97
</ label >
93
98
</ div >
94
- < label >
99
+ < label className = { classes . textInfo } >
95
100
Copy here a document (you can copy it from a collection using a tool
96
101
like Mongo Compass)
97
102
</ label >
You can’t perform that action at this time.
0 commit comments