261103_01_FIX: KriAutoComplete 기본 검색을 contains 방식으로 변경
This commit is contained in:
@@ -3,14 +3,15 @@
|
||||
import * as React from 'react'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { MultiSelect } from '@/components/common/multi-select'
|
||||
import type { MultiSelectOption, MultiSelectRef } from '@/components/common/multi-select'
|
||||
import type { MultiSelectOption, MultiSelectRef, MultiSelectSearchMatch } from '@/components/common/multi-select'
|
||||
|
||||
export type { MultiSelectOption, MultiSelectRef } from '@/components/common/multi-select'
|
||||
export type { MultiSelectOption, MultiSelectRef, MultiSelectSearchMatch } from '@/components/common/multi-select'
|
||||
|
||||
export interface KriAutoCompleteBaseProps<T> {
|
||||
items: T[]
|
||||
searchable?: boolean
|
||||
searchMode?: 'filter' | 'inputOnly'
|
||||
searchMatch?: MultiSelectSearchMatch
|
||||
defaultSearchValue?: string
|
||||
onSearchValueChange?: (value: string) => void
|
||||
placeholder?: string
|
||||
@@ -58,6 +59,7 @@ export function KriMultiSelect<T = unknown>({
|
||||
onChange,
|
||||
searchable = true,
|
||||
searchMode = 'filter',
|
||||
searchMatch = 'contains',
|
||||
defaultSearchValue = '',
|
||||
onSearchValueChange,
|
||||
maxCount = 1,
|
||||
@@ -100,6 +102,7 @@ export function KriMultiSelect<T = unknown>({
|
||||
badgeLabelClassName={badgeLabelClassName}
|
||||
searchable={searchable}
|
||||
searchMode={searchMode}
|
||||
searchMatch={searchMatch}
|
||||
defaultSearchValue={defaultSearchValue}
|
||||
onSearchValueChange={onSearchValueChange}
|
||||
maxCount={maxCount}
|
||||
@@ -135,6 +138,7 @@ function KriSingleSelectInner<T>(
|
||||
onChange,
|
||||
searchable = true,
|
||||
searchMode = 'filter',
|
||||
searchMatch = 'contains',
|
||||
defaultSearchValue = '',
|
||||
onSearchValueChange,
|
||||
placeholder = '옵션을 선택하세요',
|
||||
@@ -216,6 +220,7 @@ function KriSingleSelectInner<T>(
|
||||
badgeLabelClassName={badgeLabelClassName ?? 'min-w-0 flex-1'}
|
||||
searchable={searchable}
|
||||
searchMode={searchMode}
|
||||
searchMatch={searchMatch}
|
||||
defaultSearchValue={defaultSearchValue}
|
||||
onSearchValueChange={onSearchValueChange}
|
||||
preventDeselect={preventDeselect}
|
||||
|
||||
Reference in New Issue
Block a user