@@ -44,12 +44,12 @@ const SelectFolder = ({ required, onSuccess, folderCls, isReset }) => {
44
44
const FolderQuery = new Parse . Query ( folderCls ) ;
45
45
if ( folderPtr ) {
46
46
FolderQuery . equalTo ( "Folder" , folderPtr ) ;
47
- FolderQuery . equalTo ( "Type" , "Folder" ) ;
48
47
FolderQuery . notEqualTo ( "IsArchive" , true ) ;
48
+ FolderQuery . descending ( "Type" ) ;
49
49
} else {
50
50
FolderQuery . doesNotExist ( "Folder" ) ;
51
- FolderQuery . equalTo ( "Type" , "Folder" ) ;
52
51
FolderQuery . notEqualTo ( "IsArchive" , true ) ;
52
+ FolderQuery . descending ( "Type" ) ;
53
53
}
54
54
55
55
const res = await FolderQuery . find ( ) ;
@@ -220,7 +220,7 @@ const SelectFolder = ({ required, onSuccess, folderCls, isReset }) => {
220
220
handleClose = { handleCancel }
221
221
>
222
222
< div className = "w-full min-w-[300px] md:min-w-[500px] max-w-[500px] px-3" >
223
- < div className = "py-2 text-[#ac4848] text-[14px] font-[500]" >
223
+ < div className = "pt-1 text-[#ac4848] text-[14px] font-[500]" >
224
224
< span
225
225
className = "cursor-pointer"
226
226
title = "OpenSign™ Drive"
@@ -241,21 +241,31 @@ const SelectFolder = ({ required, onSuccess, folderCls, isReset }) => {
241
241
{ " / " }
242
242
</ React . Fragment >
243
243
) ) }
244
- < hr />
244
+ < hr className = "bg-[#8a8a8a] mt-[0.750rem]" />
245
245
</ div >
246
- < div className = "mt-2 mb-3 " >
246
+ < div className = "mb-2 " >
247
247
< div className = "max-h-[210px] overflow-auto" >
248
248
{ ! isAdd &&
249
249
folderList . length > 0 &&
250
250
folderList . map ( ( folder ) => (
251
251
< div
252
- key = { folder . Name }
253
- className = "border-b-[1px] border-[#8a8a8a] px-2 py-2 mb-2 cursor-pointer "
254
- onClick = { ( ) => handleSelect ( folder ) }
252
+ key = { folder . objectId }
253
+ className = { `${
254
+ folder . Type === "Folder"
255
+ ? "cursor-pointer"
256
+ : "cursor-default"
257
+ } border-b-[1px] border-[#8a8a8a] py-2 mb-0.5"`}
258
+ onClick = { ( ) =>
259
+ folder . Type === "Folder" && handleSelect ( folder )
260
+ }
255
261
>
256
262
< div className = "flex items-center gap-2" >
257
263
< i
258
- className = "fa fa-folder text-neutral text-[1.4rem]"
264
+ className = { `${
265
+ folder . Type === "Folder"
266
+ ? "fa fa-folder op-text-secondary"
267
+ : "fa fa-file op-text-primary"
268
+ } text-[1.4rem]`}
259
269
aria-hidden = "true"
260
270
> </ i >
261
271
< span className = "font-semibold" > { folder . Name } </ span >
0 commit comments