From c1da08ee25e978295c51bd5bb8c96b2cbcdc3d37 Mon Sep 17 00:00:00 2001 From: Bonymol-aot Date: Wed, 1 Jan 2025 11:38:10 +0530 Subject: [PATCH 1/2] Resolved UI issues in roles and table --- forms-flow-admin/src/components/roles/roles.tsx | 8 ++++++-- forms-flow-admin/src/index.scss | 10 +++------- forms-flow-theme/scss/_table.scss | 4 ++++ 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/forms-flow-admin/src/components/roles/roles.tsx b/forms-flow-admin/src/components/roles/roles.tsx index 6cf406ed3..f3a5f55a4 100644 --- a/forms-flow-admin/src/components/roles/roles.tsx +++ b/forms-flow-admin/src/components/roles/roles.tsx @@ -64,9 +64,13 @@ const Roles = React.memo((props: any) => { const [permission, setPermission] = React.useState([]); const filterList = (filterTerm, List) => { - let roleList = removingTenantId(List,tenantId); + let roleList = removingTenantId(List, tenantId); + + // Escape backslashes and square brackets in filterTerm for safe regex use + const escapedFilterTerm = filterTerm.replace(/([\\[])/g, '\\$1'); + let newRoleList = roleList.filter((role) => { - return role.name.toLowerCase().search(filterTerm.toLowerCase()) !== -1; + return role.name.toLowerCase().search(escapedFilterTerm.toLowerCase()) !== -1; }); return newRoleList; }; diff --git a/forms-flow-admin/src/index.scss b/forms-flow-admin/src/index.scss index 9a9c83a8f..381a9402c 100644 --- a/forms-flow-admin/src/index.scss +++ b/forms-flow-admin/src/index.scss @@ -11,10 +11,6 @@ bottom: 0; color: #0072ed !important; } -.react-bootstrap-table table { - min-height: 60vh; - } - - .react-bootstrap-table{ - min-height: 65vh; - } + + + diff --git a/forms-flow-theme/scss/_table.scss b/forms-flow-theme/scss/_table.scss index a7748fcf5..1420135c8 100644 --- a/forms-flow-theme/scss/_table.scss +++ b/forms-flow-theme/scss/_table.scss @@ -95,6 +95,10 @@ $status-radius: 50%; } } +.custom-table th { + vertical-align: middle; + } + .width-40 { width: 25rem !important; max-width: 40% !important; From 09a4d3c801d24b1b342cb7b086965a77b6319a02 Mon Sep 17 00:00:00 2001 From: Bonymol-aot Date: Wed, 1 Jan 2025 12:26:41 +0530 Subject: [PATCH 2/2] updated table style fix --- forms-flow-theme/scss/_table.scss | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/forms-flow-theme/scss/_table.scss b/forms-flow-theme/scss/_table.scss index 1420135c8..050664c06 100644 --- a/forms-flow-theme/scss/_table.scss +++ b/forms-flow-theme/scss/_table.scss @@ -95,9 +95,11 @@ $status-radius: 50%; } } -.custom-table th { +.custom-table th, +.custom-table td { vertical-align: middle; - } +} + .width-40 { width: 25rem !important;