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> = ({
127127 < div className = { [ 'field' , connectNameFieldClassName ] . join ( ' ' ) } >
128128 < InputLabel > Connect *</ InputLabel >
129129 < Controller
130+ defaultValue = { connectOptions [ 0 ] . value }
130131 control = { control }
131132 name = "connectName"
132133 render = { ( { field : { name, onChange } } ) => (
Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ const Edit: React.FC = () => {
8686 < div >
8787 < InputLabel > Type</ InputLabel >
8888 < Controller
89+ defaultValue = { schema . schemaType }
8990 control = { control }
9091 rules = { { required : true } }
9192 name = "schemaType"
@@ -108,6 +109,9 @@ const Edit: React.FC = () => {
108109 < div >
109110 < InputLabel > Compatibility level</ InputLabel >
110111 < Controller
112+ defaultValue = {
113+ schema . compatibilityLevel as CompatibilityLevelCompatibilityEnum
114+ }
111115 control = { control }
112116 name = "compatibilityLevel"
113117 render = { ( { field : { name, onChange } } ) => (
Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ const New: React.FC = () => {
9999 < div >
100100 < InputLabel > Schema Type *</ InputLabel >
101101 < Controller
102+ defaultValue = { SchemaTypeOptions [ 0 ] . value as SchemaType }
102103 control = { control }
103104 rules = { { required : 'Schema Type is required.' } }
104105 name = "schemaType"
Original file line number Diff line number Diff line change @@ -21,9 +21,10 @@ interface RouterParams {
2121
2222const New : React . FC = ( ) => {
2323 const methods = useForm < TopicFormData > ( {
24- mode : 'onTouched ' ,
24+ mode : 'all ' ,
2525 resolver : yupResolver ( topicFormValidationSchema ) ,
2626 } ) ;
27+
2728 const { clusterName } = useParams < RouterParams > ( ) ;
2829 const history = useHistory ( ) ;
2930 const dispatch = useDispatch ( ) ;
Original file line number Diff line number Diff line change @@ -115,6 +115,7 @@ const TopicForm: React.FC<Props> = ({
115115 < div >
116116 < InputLabel > Cleanup policy</ InputLabel >
117117 < Controller
118+ defaultValue = { CleanupPolicyOptions [ 0 ] . value }
118119 control = { control }
119120 name = "cleanupPolicy"
120121 render = { ( { field : { name, onChange } } ) => (
@@ -142,6 +143,7 @@ const TopicForm: React.FC<Props> = ({
142143 < Controller
143144 control = { control }
144145 name = "retentionBytes"
146+ defaultValue = { 0 }
145147 render = { ( { field : { name, onChange } } ) => (
146148 < Select
147149 name = { name }
You can’t perform that action at this time.
0 commit comments