Skip to content

Commit

Permalink
fix(alerts-table): add clear button to input search (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
peppescg authored Jan 16, 2025
1 parent 7a0e61c commit ee1ac50
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/components/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ import {
SearchField,
Table,
TableBody,
FieldGroup,
TableHeader,
SearchFieldClearButton,
Badge,
} from "@stacklok/ui-kit";
import { Badge } from "@stacklok/ui-kit";
import { useCallback, useEffect } from "react";
import { BarChart } from "@/viz/BarChart";
import { LineChart } from "@/viz/LineChart";
Expand Down Expand Up @@ -170,7 +172,15 @@ export function Dashboard() {
value={search}
onChange={(value) => handleSearch(value.toLowerCase().trim())}
>
<Input type="search" placeholder="Search..." icon={<Search />} />
<FieldGroup>
<Input
type="search"
placeholder="Search..."
isBorderless
icon={<Search />}
/>
<SearchFieldClearButton />
</FieldGroup>
</SearchField>
</div>
</div>
Expand Down

0 comments on commit ee1ac50

Please sign in to comment.