remove item
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { useRequest, useToggle } from 'ahooks'
|
||||
import { CheckIcon, UserIcon } from 'lucide-react'
|
||||
import { CheckIcon, UserIcon, XIcon } from 'lucide-react'
|
||||
import { formatCPF } from '@brazilian-utils/brazilian-utils'
|
||||
|
||||
import { Avatar, AvatarFallback } from '@repo/ui/components/ui/avatar'
|
||||
@@ -24,6 +24,7 @@ import {
|
||||
CommandList
|
||||
} from '@repo/ui/components/ui/command'
|
||||
import { Spinner } from '@repo/ui/components/ui/spinner'
|
||||
import { Button } from '@repo/ui/components/ui/button'
|
||||
|
||||
interface AsyncComboboxProps {
|
||||
value: any
|
||||
@@ -66,6 +67,23 @@ export function AsyncCombobox({
|
||||
<UserIcon />
|
||||
</InputGroupAddon>
|
||||
|
||||
{value && (
|
||||
<InputGroupAddon align="inline-end" className="mr-0">
|
||||
<Button
|
||||
variant="link"
|
||||
size="icon-sm"
|
||||
className="cursor-pointer text-black dark:text-white"
|
||||
onClick={(e) => {
|
||||
e.preventDefault()
|
||||
onChange?.(undefined)
|
||||
set(false)
|
||||
}}
|
||||
>
|
||||
<XIcon />
|
||||
</Button>
|
||||
</InputGroupAddon>
|
||||
)}
|
||||
|
||||
{loading && (
|
||||
<InputGroupAddon align="inline-end">
|
||||
<Spinner />
|
||||
|
||||
Reference in New Issue
Block a user