File tree Expand file tree Collapse file tree 5 files changed +10
-1
lines changed
kafka-ui-react-app/src/components Expand file tree Collapse file tree 5 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,7 @@ const New: React.FC<NewProps> = ({
127
127
< div className = { [ 'field' , connectNameFieldClassName ] . join ( ' ' ) } >
128
128
< InputLabel > Connect *</ InputLabel >
129
129
< Controller
130
+ defaultValue = { connectOptions [ 0 ] . value }
130
131
control = { control }
131
132
name = "connectName"
132
133
render = { ( { field : { name, onChange } } ) => (
Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ const Edit: React.FC = () => {
86
86
< div >
87
87
< InputLabel > Type</ InputLabel >
88
88
< Controller
89
+ defaultValue = { schema . schemaType }
89
90
control = { control }
90
91
rules = { { required : true } }
91
92
name = "schemaType"
@@ -108,6 +109,9 @@ const Edit: React.FC = () => {
108
109
< div >
109
110
< InputLabel > Compatibility level</ InputLabel >
110
111
< Controller
112
+ defaultValue = {
113
+ schema . compatibilityLevel as CompatibilityLevelCompatibilityEnum
114
+ }
111
115
control = { control }
112
116
name = "compatibilityLevel"
113
117
render = { ( { field : { name, onChange } } ) => (
Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ const New: React.FC = () => {
99
99
< div >
100
100
< InputLabel > Schema Type *</ InputLabel >
101
101
< Controller
102
+ defaultValue = { SchemaTypeOptions [ 0 ] . value as SchemaType }
102
103
control = { control }
103
104
rules = { { required : 'Schema Type is required.' } }
104
105
name = "schemaType"
Original file line number Diff line number Diff line change @@ -21,9 +21,10 @@ interface RouterParams {
21
21
22
22
const New : React . FC = ( ) => {
23
23
const methods = useForm < TopicFormData > ( {
24
- mode : 'onTouched ' ,
24
+ mode : 'all ' ,
25
25
resolver : yupResolver ( topicFormValidationSchema ) ,
26
26
} ) ;
27
+
27
28
const { clusterName } = useParams < RouterParams > ( ) ;
28
29
const history = useHistory ( ) ;
29
30
const dispatch = useDispatch ( ) ;
Original file line number Diff line number Diff line change @@ -115,6 +115,7 @@ const TopicForm: React.FC<Props> = ({
115
115
< div >
116
116
< InputLabel > Cleanup policy</ InputLabel >
117
117
< Controller
118
+ defaultValue = { CleanupPolicyOptions [ 0 ] . value }
118
119
control = { control }
119
120
name = "cleanupPolicy"
120
121
render = { ( { field : { name, onChange } } ) => (
@@ -142,6 +143,7 @@ const TopicForm: React.FC<Props> = ({
142
143
< Controller
143
144
control = { control }
144
145
name = "retentionBytes"
146
+ defaultValue = { 0 }
145
147
render = { ( { field : { name, onChange } } ) => (
146
148
< Select
147
149
name = { name }
You can’t perform that action at this time.
0 commit comments