diff --git a/apps/OpenSign/src/components/opensigndrive/DriveBody.js b/apps/OpenSign/src/components/opensigndrive/DriveBody.js index 37f11c55c..4a7fde6b0 100644 --- a/apps/OpenSign/src/components/opensigndrive/DriveBody.js +++ b/apps/OpenSign/src/components/opensigndrive/DriveBody.js @@ -357,7 +357,7 @@ function DriveBody(props) { e.stopPropagation(); handleMenuItemClick("Download", data); }} - className="fa-light fa-download mr-[8px] op-text-primary" + className="fa-light fa-download mr-[8px] op-text-primary cursor-pointer" aria-hidden="true" > @@ -370,7 +370,16 @@ function DriveBody(props) { {/* folder */}
handleOnclikFolder(data)} + onClick={() => { + if (rename) { + inputRef.current.setSelectionRange( + inputRef.current.value.length, + inputRef.current.value.length + ); + } else { + handleOnclikFolder(data); + } + }} className="cursor-pointer" > {rename === data.objectId ? ( {data.Name} @@ -423,7 +425,11 @@ function DriveBody(props) {
) : ( - +
@@ -432,7 +438,16 @@ function DriveBody(props) { {/* pdf */}
checkPdfStatus(data)} + onClick={() => { + if (rename) { + inputRef.current.setSelectionRange( + inputRef.current.value.length, + inputRef.current.value.length + ); + } else { + checkPdfStatus(data); + } + }} className="cursor-pointer" > { - inputRef.current.setSelectionRange(0, 0); - const input = inputRef.current; - if (input) { - input.select(); - } - }} + onFocus={() => inputRef.current.select()} onBlur={() => handledRenameDoc(data)} onKeyDown={(e) => handleEnterPress(e, data)} ref={inputRef} defaultValue={renameValue} - // value={renameValue} onChange={(e) => setRenameValue(e.target.value)} - className="w-[100px] border-[1.5px] border-black rounded-sm text-[10px]" + className="op-input op-input-bordered op-input-xs w-[100px] focus:outline-none hover:border-base-content text-[10px]" /> ) : ( {data.Name}