Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: search capabilities #475

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/components/Ecosystem/EcosystemList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ const EcosystemList = () => {
getData = setTimeout(() => {
fetchEcosystems();
}, 1000);
return () => clearTimeout(getData);
} else {
fetchEcosystems();
}
Expand Down Expand Up @@ -318,4 +319,4 @@ const EcosystemList = () => {

)
}
export default EcosystemList;
export default EcosystemList;
3 changes: 2 additions & 1 deletion src/components/Ecosystem/MemberList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const MemberList = () => {
firstMember: { ecosystemRole: { name: string } },
secondMember: { ecosystemRole: { name: string } },
) => {
// remove this sorting logic when implemented from backend
const firstName = firstMember?.ecosystemRole?.name;
const secondName = secondMember?.ecosystemRole?.name;

Expand Down Expand Up @@ -222,4 +223,4 @@ const MemberList = () => {
);
};

export default MemberList;
export default MemberList;
1 change: 1 addition & 0 deletions src/components/Issuance/History.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ const HistoryBulkIssuance = () => {
getData = setTimeout(() => {
getConnections();
}, 1000);
return () => clearTimeout(getData);
} else {
getConnections();
}
Expand Down
1 change: 1 addition & 0 deletions src/components/Issuance/HistoryDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const HistoryDetails = ({ requestId }: IProps) => {
getData = setTimeout(() => {
getHistoryDetails();
}, 1000);
return () => clearTimeout(getData);
} else {
getHistoryDetails();
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Issuance/IssuedCrdentials.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ const CredentialList = () => {
if (searchText.length >= 1) {
getData = setTimeout(() => {
getIssuedCredDefs()

}, 1000)
return () => clearTimeout(getData);
} else {
getIssuedCredDefs()
}
Expand Down
7 changes: 5 additions & 2 deletions src/components/Verification/VerificationCredentialList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,11 @@ const VerificationCredentialList = () => {
useEffect(() => {
let getData: NodeJS.Timeout

if (searchText.length >= 1) {
getData = setTimeout(() => { }, 1000);
if (searchText?.length >= 1) {
getData = setTimeout(() => {
getproofRequestList()
}, 1000);
return () => clearTimeout(getData);
} else {
getproofRequestList()
}
Expand Down
1 change: 1 addition & 0 deletions src/components/organization/OrganizationsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ const OrganizationsList = () => {
getData = setTimeout(() => {
getAllOrganizations();
}, 1000);
return () => clearTimeout(getData);
} else {
getAllOrganizations();
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/organization/invitations/Invitations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ const Invitations = () => {
if (searchText.length >= 1) {
getData = setTimeout(() => {
getAllInvitations()

}, 1000)
return () => clearTimeout(getData);
} else {
getAllInvitations()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ const ReceivedInvitations = () => {
getData = setTimeout(() => {
getAllInvitations();
}, 1000);
return () => clearTimeout(getData);
} else {
getAllInvitations();
}
Expand Down
1 change: 1 addition & 0 deletions src/components/organization/users/Members.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ const Members = () => {
getData = setTimeout(() => {
getAllUsers();
}, 1000);
return () => clearTimeout(getData);
} else {
getAllUsers();
}
Expand Down
1 change: 1 addition & 0 deletions src/components/publicProfile/OrganisationPublicProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ const OrganisationPublicProfile = () => {
getData = setTimeout(() => {
getAllOrganizations();
}, 1000);
return () => clearTimeout(getData);
} else {
getAllOrganizations();
}
Expand Down