Skip to content

Commit

Permalink
fix: update functional argument names
Browse files Browse the repository at this point in the history
  • Loading branch information
ajhenry committed Jan 24, 2024
1 parent c040f0e commit 17eba50
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions who-metrics-ui/src/components/RepositoriesTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ type SelectOption = {

// This selects a field to populate a dropdown with
const dropdownOptions = (field: keyof Repo, filter = ''): SelectOption[] =>
Array.from(new Set(repos.map((r) => r[field])))
.map((d) => ({
label: d,
value: d,
Array.from(new Set(repos.map((repo) => repo[field])))
.map((fieldName) => ({
label: fieldName,
value: fieldName,
}))
.filter((d) =>
(d.value as string).toLowerCase().includes(filter.toLowerCase()),
.filter((fieldName) =>
(fieldName.value as string).toLowerCase().includes(filter.toLowerCase()),
);

// Helper function to get the selected option value from a filter and field
Expand Down

0 comments on commit 17eba50

Please sign in to comment.