🔥 The free & Open Source DocuSign alternative
JavaScript digital-signaturedocument-signingdocusign-alternativedocusign-freee-signatureelectronic-signatureelectronic-signaturesesignesignaturehacktoberfestjavascriptlegaltechmongodbnodejsopen-sourcepdf-signpdf-signaturereactjsself-hostedsign-pdf-files
fix: sorting issue by name in open-sign drive
RaktimaNXG40961936d0ac
diff --git a/apps/OpenSign/src/components/opensigndrive/DriveBody.js b/apps/OpenSign/src/components/opensigndrive/DriveBody.jsindex b8c2bdd56..213d3eac4 100644--- a/apps/OpenSign/src/components/opensigndrive/DriveBody.js+++ b/apps/OpenSign/src/components/opensigndrive/DriveBody.js@@ -70,6 +70,7 @@ function DriveBody(props) {return item;});props.setPdfData(updatedData);+ props.sortingData(null, null, updatedData);await axios.put(`${localStorage.getItem("baseUrl")}classes/${localStorage.getItem(@@ -214,8 +215,8 @@ function DriveBody(props) {? true: false: selecFolderId- ? false- : true;+ ? false+ : true;if (!checkExist) {if (moveFolderId) {updateData = {diff --git a/apps/OpenSign/src/pages/Opensigndrive.js b/apps/OpenSign/src/pages/Opensigndrive.jsindex 192a9d766..f4a30bd67 100644--- a/apps/OpenSign/src/pages/Opensigndrive.js+++ b/apps/OpenSign/src/pages/Opensigndrive.js@@ -203,6 +203,7 @@ function Opensigndrive() {const result = JSON.parse(JSON.stringify(res));setPdfData((prev) => [...prev, result]);+ sortingData(null, null, [result], true);setNewFolderName();setIsFolderLoader(false);setIsFolder(false);@@ -223,7 +224,10 @@ function Opensigndrive() {const sortedBy = (appInfo, type, order) => {if (type === orderName.Name) {if (order === orderName.Ascending) {- return appInfo.sort((a, b) => (a.Name > b.Name ? 1 : -1));+ appInfo.sort((a, b) => (a.Name > b.Name ? 1 : -1));+ return appInfo.sort((a, b) =>+ a.Name.toLowerCase() < b.Name.toLowerCase() ? -1 : 1+ );} else if (order === orderName.Descending) {return appInfo.sort((a, b) => (a.Name > b.Name ? -1 : 1));}@@ -724,6 +728,7 @@ function Opensigndrive() {isList={isList}setIsAlert={setIsAlert}setSkip={setSkip}+ sortingData={sortingData}/>{loading && (<div style={{ textAlign: "center" }}>Loading...</div>