Skip to content

Commit

Permalink
chore: remove blank space from users filters (apache#21346)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lily Kuang authored Sep 13, 2022
1 parent 64d216a commit 973d870
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions superset-frontend/src/views/CRUD/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand All @@ -106,8 +107,7 @@ const createFetchResourceMethod =
value,
});
}
},
);
});

if (loggedUser && (!filterValue || fetchedLoggedUser)) {
data.unshift(loggedUser);
Expand Down

0 comments on commit 973d870

Please sign in to comment.