mirror of
https://github.com/ershisan99/www.git
synced 2025-12-17 21:09:22 +00:00
fix search
This commit is contained in:
@@ -52,8 +52,10 @@ function PlayerSelectorRaw({
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className='w-[200px] p-0'>
|
||||
<Command
|
||||
filter={(value, search) => {
|
||||
filter={(value, search, keywords) => {
|
||||
if (value.toLowerCase().includes(search.toLowerCase())) return 1
|
||||
const name = keywords?.[0]
|
||||
if (name?.toLowerCase().includes(search.toLowerCase())) return 1
|
||||
return 0
|
||||
}}
|
||||
>
|
||||
@@ -65,6 +67,7 @@ function PlayerSelectorRaw({
|
||||
<CommandItem
|
||||
key={`${player.value}-2`}
|
||||
value={player.value}
|
||||
keywords={[player.label]}
|
||||
onSelect={(currentValue) => {
|
||||
onValueChange(currentValue === value ? '' : currentValue)
|
||||
onOpenChange(false)
|
||||
|
||||
Reference in New Issue
Block a user