Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions apps/dashboard/app/(app)/audit/[bucket]/filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const Filter: React.FC<Props> = ({ options, title, param }) => {

return (
<Popover>
<PopoverTrigger asChild>
<PopoverTrigger>
<Button className="flex items-center h-8 gap-2 ">
{title}
{selected.length > 0 && (
Expand Down Expand Up @@ -70,10 +70,9 @@ export const Filter: React.FC<Props> = ({ options, title, param }) => {
<CommandGroup>
{options.map((option) => {
const isSelected = selected.includes(option.value);

return (
<div
onMouseDownCapture={() => {
onClick={() => {
const next = isSelected
? selected.filter((v) => v !== option.value)
: Array.from(new Set([...selected, option.value]));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const Filters: React.FC = () => {
<div className="flex flex-col w-full gap-2">
<div className="flex items-center justify-end w-full gap-2">
<DropdownMenu>
<DropdownMenuTrigger asChild>
<DropdownMenuTrigger>
<Button className="text-xs">
Add Filter <ChevronDown className="w-4 h-4" />
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const Menu: React.FC<Props> = ({ namespace, identifier }) => {

return (
<DropdownMenu>
<DropdownMenuTrigger asChild>
<DropdownMenuTrigger>
<Button variant="ghost" shape="square">
<MoreHorizontal className="w-4 h-4" />
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export const UpdateUserEmail: React.FC = () => {

<TableCell align="right">
<DropdownMenu>
<DropdownMenuTrigger asChild>
<DropdownMenuTrigger>
<Button variant="ghost">
<MoreHorizontal className="w-4 h-4" />
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export const ApiKeyTable: React.FC<Props> = ({ data }) => {
<div>
<Dialog>
<DropdownMenu>
<DropdownMenuTrigger asChild>
<DropdownMenuTrigger>
<Button variant="ghost" className="w-8 h-8 p-0">
<span className="sr-only">Open menu</span>
<MoreHorizontal className="w-4 h-4" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export function DataTable<TData, TValue>({ data, columns }: DataTableProps<TData
className="max-w-sm md:max-w-2xl"
/>
<DropdownMenu>
<DropdownMenuTrigger asChild>
<DropdownMenuTrigger>
<Button className="min-w-full mt-4 ml-0 md:min-w-min md:mt-0 md:ml-auto">
Columns
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export const RootKeyTable: React.FC<Props> = ({ data }) => {
<div>
<Dialog>
<DropdownMenu>
<DropdownMenuTrigger asChild>
<DropdownMenuTrigger>
<Button variant="ghost" className="w-8 h-8 p-0">
<span className="sr-only">Open menu</span>
<MoreHorizontal className="w-4 h-4" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export function DataTable<TData, TValue>({ data, columns }: DataTableProps<TData
className="max-w-sm md:max-w-2xl"
/>
<DropdownMenu>
<DropdownMenuTrigger asChild>
<DropdownMenuTrigger>
<Button className="min-w-full mt-4 ml-0 md:min-w-min md:mt-0 md:ml-auto">
Columns
</Button>
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/components/data-table/column-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function DataTableColumnHeader<TData, TValue>({
return (
<div className={cn("flex items-center space-x-2", className)}>
<DropdownMenu>
<DropdownMenuTrigger asChild>
<DropdownMenuTrigger>
<Button variant="ghost" className="h-8 -ml-3">
<span>{title}</span>
{column.getIsSorted() === "desc" ? (
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/components/data-table/view-options.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ interface DataTableViewOptionsProps<TData> {
export function DataTableViewOptions<TData>({ table }: DataTableViewOptionsProps<TData>) {
return (
<DropdownMenu>
<DropdownMenuTrigger asChild>
<DropdownMenuTrigger>
<Button className="hidden h-8 ml-auto lg:flex">
<ListFilter className="w-4 h-4 mr-2" />
View
Expand Down