File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,7 @@ interface KeyValueProps {
119119 // render the value field as a textarea when true
120120 isTextArea ?: boolean
121121 isEncrypted ?: boolean
122+ isValueOptional ?: boolean
122123}
123124
124125// This local subcomponent watches the key field (using its path) and checks the provided
@@ -182,6 +183,7 @@ export default function KeyValue(props: KeyValueProps) {
182183 decoratorMapping,
183184 isTextArea = false ,
184185 isEncrypted,
186+ isValueOptional = false ,
185187 } = props
186188
187189 const { fields, append, remove } = useFieldArray ( { control, name } )
@@ -220,7 +222,7 @@ export default function KeyValue(props: KeyValueProps) {
220222 const commonProps = {
221223 ...register ( valuePath ) ,
222224 width : valueSize ,
223- label : showLabel && localIndex === 0 ? valueLabel : '' ,
225+ label : showLabel && localIndex === 0 ? ` ${ valueLabel } ${ isValueOptional ? ' (optional)' : '' } ` : '' ,
224226 noMarginTop : compressed ,
225227 disabled : isFieldDisabled ,
226228 type : valueIsNumber ? 'number' : undefined ,
Original file line number Diff line number Diff line change @@ -313,12 +313,13 @@ export default function CreateEditBuilds({
313313 title = 'Extra arguments'
314314 subTitle = 'Additional arguments to pass on to the build executor'
315315 keyLabel = 'Name'
316- valueLabel = 'Value (optional) '
316+ valueLabel = 'Value'
317317 addLabel = 'Add argument'
318318 compressed
319319 name = { `mode.${ watch ( 'mode.type' ) } .envVars` }
320320 { ...register ( `mode.${ watch ( 'mode.type' ) } .envVars` ) }
321321 errorText = { extraArgumentsError ( ) }
322+ isValueOptional
322323 />
323324
324325 < Divider sx = { { mt : 2 , mb : 2 } } />
You can’t perform that action at this time.
0 commit comments