Support readonly flag in URLProperty. (#1041)
This commit is contained in:
parent
fb2410f430
commit
22bfe2da13
2 changed files with 3 additions and 0 deletions
|
@ -11,6 +11,7 @@ import LinkIcon from '../../../widgets/icons/Link'
|
|||
|
||||
type Props = {
|
||||
value: string
|
||||
readonly?: boolean
|
||||
onChange: (value: string) => void
|
||||
onSave: () => void
|
||||
onCancel: () => void
|
||||
|
@ -39,6 +40,7 @@ const URLProperty = (props: Props): JSX.Element => {
|
|||
className='octo-propertyvalue'
|
||||
placeholderText=''
|
||||
value={props.value}
|
||||
readonly={props.readonly}
|
||||
onChange={props.onChange}
|
||||
onSave={props.onSave}
|
||||
onCancel={props.onCancel}
|
||||
|
|
|
@ -208,6 +208,7 @@ const PropertyValueElement = (props:Props): JSX.Element => {
|
|||
return (
|
||||
<URLProperty
|
||||
value={value as string}
|
||||
readonly={readOnly}
|
||||
onChange={setValue}
|
||||
onSave={saveTextProperty}
|
||||
onCancel={() => setValue(propertyValue)}
|
||||
|
|
Loading…
Reference in a new issue