You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by li...@apache.org on 2022/09/13 20:59:57 UTC

[superset] branch master updated: chore: remove blank space from users filters (#21346)

This is an automated email from the ASF dual-hosted git repository.

lilykuang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 973d870538 chore: remove blank space from users filters (#21346)
973d870538 is described below

commit 973d870538155f649ea7550cb0ff2f78f1766a8c
Author: Lily Kuang <li...@preset.io>
AuthorDate: Tue Sep 13 13:59:46 2022 -0700

    chore: remove blank space from users filters (#21346)
---
 superset-frontend/src/views/CRUD/utils.tsx | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/superset-frontend/src/views/CRUD/utils.tsx b/superset-frontend/src/views/CRUD/utils.tsx
index 64df874303..b82e5b4e58 100644
--- a/superset-frontend/src/views/CRUD/utils.tsx
+++ b/superset-frontend/src/views/CRUD/utils.tsx
@@ -92,8 +92,9 @@ const createFetchResourceMethod =
       : undefined;
 
     const data: { label: string; value: string | number }[] = [];
-    json?.result?.forEach(
-      ({ text, value }: { text: string; value: string | number }) => {
+    json?.result
+      ?.filter(({ text }: { text: string }) => text.trim().length > 0)
+      .forEach(({ text, value }: { text: string; value: string | number }) => {
         if (
           loggedUser &&
           value === loggedUser.value &&
@@ -106,8 +107,7 @@ const createFetchResourceMethod =
             value,
           });
         }
-      },
-    );
+      });
 
     if (loggedUser && (!filterValue || fetchedLoggedUser)) {
       data.unshift(loggedUser);