File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed
packages/ui/src/fields/Upload Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 5
5
position : relative ;
6
6
max-width : 100% ;
7
7
8
+ & __drag {
9
+ & [aria-disabled = ' true' ] {
10
+ & :hover {
11
+ cursor : default ;
12
+ }
13
+ }
14
+ }
15
+
8
16
& __draggable-rows {
9
17
display : flex ;
10
18
flex-direction : column ;
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ export function UploadComponentHasMany(props: Props) {
76
76
}
77
77
78
78
return (
79
- < DraggableSortableItem disabled = { ! isSortable } id = { id } key = { id } >
79
+ < DraggableSortableItem disabled = { ! isSortable || readonly } id = { id } key = { id } >
80
80
{ ( draggableSortableItemProps ) => (
81
81
< div
82
82
className = { [
@@ -93,7 +93,7 @@ export function UploadComponentHasMany(props: Props) {
93
93
} }
94
94
>
95
95
< UploadCard size = "small" >
96
- { isSortable && draggableSortableItemProps && (
96
+ { draggableSortableItemProps && (
97
97
< div
98
98
className = { `${ baseClass } __drag` }
99
99
{ ...draggableSortableItemProps . attributes }
Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ export function UploadInput(props: UploadInputProps) {
158
158
const loadedValueDocsRef = React . useRef < boolean > ( false )
159
159
160
160
const canCreate = useMemo ( ( ) => {
161
- if ( readOnly || ! allowCreate ) {
161
+ if ( ! allowCreate ) {
162
162
return false
163
163
}
164
164
@@ -558,7 +558,7 @@ export function UploadInput(props: UploadInputProps) {
558
558
/>
559
559
</ div >
560
560
561
- { canCreate && (
561
+ { canCreate && ! readOnly && (
562
562
< p className = { `${ baseClass } __dragAndDropText` } >
563
563
{ t ( 'general:or' ) } { t ( 'upload:dragAndDrop' ) }
564
564
</ p >
You can’t perform that action at this time.
0 commit comments