Skip to content

Commit e9c6275

Browse files
committed
Filter button improvements
1 parent 48519f9 commit e9c6275

File tree

1 file changed

+5
-10
lines changed
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.models._index

1 file changed

+5
-10
lines changed

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.models._index/route.tsx

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,7 @@ function FiltersBar({
229229
const location = useOptimisticLocation();
230230
const searchParams = new URLSearchParams(location.search);
231231
const hasFilters =
232-
searchParams.has("providers") ||
233-
searchParams.has("features") ||
234-
searchParams.has("search");
232+
searchParams.has("providers") || searchParams.has("features") || searchParams.has("search");
235233

236234
const compareDisabled = compareSet.size < 2;
237235

@@ -242,8 +240,8 @@ function FiltersBar({
242240
<FeaturesFilter features={allFeatures} />
243241
<SearchInput placeholder="Search models…" />
244242
{hasFilters && (
245-
<Form className="h-6">
246-
<Button variant="secondary/small" LeadingIcon={XMarkIcon} tooltip="Clear all filters" />
243+
<Form className="-ml-1 h-6">
244+
<Button variant="minimal/small" LeadingIcon={XMarkIcon} tooltip="Clear all filters" />
247245
</Form>
248246
)}
249247
</div>
@@ -324,7 +322,7 @@ function ModelsList({
324322
}
325323

326324
return (
327-
<Table containerClassName="max-h-full pb-[2.5rem]" showTopBorder={false}>
325+
<Table containerClassName="max-h-full" showTopBorder={false}>
328326
<TableHeader>
329327
<TableRow>
330328
<TableHeaderCell className="w-8" />
@@ -1113,10 +1111,7 @@ export default function ModelsPage() {
11131111
.filter((m) => {
11141112
if (search && !m.displayId.toLowerCase().includes(search.toLowerCase())) return false;
11151113
if (selectedProviders.length > 0 && !selectedProviders.includes(m.provider)) return false;
1116-
if (
1117-
selectedFeatures.length > 0 &&
1118-
!selectedFeatures.every((f) => m.features.includes(f))
1119-
)
1114+
if (selectedFeatures.length > 0 && !selectedFeatures.every((f) => m.features.includes(f)))
11201115
return false;
11211116
return true;
11221117
});

0 commit comments

Comments
 (0)