From 880de6e3d1336962c5b66e1756e21d228e06d5b9 Mon Sep 17 00:00:00 2001 From: JayaShakthi97 Date: Mon, 19 Feb 2024 18:30:17 +0530 Subject: [PATCH] Fix lint issues --- .../components/application-role-groups.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/console/src/features/application-roles/components/application-role-groups.tsx b/apps/console/src/features/application-roles/components/application-role-groups.tsx index 0a2654e811c..8199ce919af 100644 --- a/apps/console/src/features/application-roles/components/application-role-groups.tsx +++ b/apps/console/src/features/application-roles/components/application-role-groups.tsx @@ -1,5 +1,5 @@ /** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. + * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). * * WSO2 LLC. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except @@ -81,8 +81,8 @@ const ApplicationRoleGroups = (props: ApplicationRoleGroupsProps): ReactElement error: applicationRoleGroupDataFetchRequestError } = useApplicationRoleMappedGroups(appId, roleId); - useEffect(() => { - if (originalApplicationRoleGroupData instanceof IdentityAppsApiException + useEffect(() => { + if (originalApplicationRoleGroupData instanceof IdentityAppsApiException || applicationRoleGroupDataFetchRequestError) { handleAlerts({ description: t( @@ -124,11 +124,11 @@ const ApplicationRoleGroups = (props: ApplicationRoleGroupsProps): ReactElement if (query === "") { setProcessedGroupsList(originalApplicationRoleGroupData.groups); - + return; } - const filteredGroupsList: ApplicationRoleGroupInterface[] = + const filteredGroupsList: ApplicationRoleGroupInterface[] = originalApplicationRoleGroupData.groups.filter((group: ApplicationRoleGroupInterface) => { return group.name.toLowerCase().includes(query.toLowerCase()); }); @@ -148,7 +148,7 @@ const ApplicationRoleGroups = (props: ApplicationRoleGroupsProps): ReactElement }; setSubmitting(true); - + updateApplicationRoleMappedGroups(appId, roleId, groupData) .then(() => { handleAlerts({ @@ -274,7 +274,7 @@ const ApplicationRoleGroups = (props: ApplicationRoleGroupsProps): ReactElement return null; }; - + /** * Resolves data table columns. */ @@ -374,7 +374,7 @@ const ApplicationRoleGroups = (props: ApplicationRoleGroupsProps): ReactElement }; return ( - !isApplicationRoleGroupDataFetchRequestLoading + !isApplicationRoleGroupDataFetchRequestLoading ? ( <> @@ -386,7 +386,7 @@ const ApplicationRoleGroups = (props: ApplicationRoleGroupsProps): ReactElement data-componentid={ `${ componentId }-groups-list-search-input` } icon={ } iconPosition="left" - onChange={ (e: ChangeEvent) => + onChange={ (e: ChangeEvent) => searchGroups(e.target.value) } value={ searchQuery } placeholder={ t("extensions:console.applicationRoles.roleGroups." +