Commit 85c5371 1 parent 4c08d8e commit 85c5371 Copy full SHA for 85c5371
File tree 4 files changed +14
-7
lines changed
datahub-web-react/src/alchemy-components/components/Select
4 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,6 @@ export const BasicSelect = <OptionType extends SelectOption>({
66
66
onSearch,
67
67
filteringPredicate,
68
68
selectLabelProps,
69
- className,
70
69
...props
71
70
} : SelectProps < OptionType > ) => {
72
71
const [ searchQuery , setSearchQuery ] = useState ( '' ) ;
@@ -164,7 +163,7 @@ export const BasicSelect = <OptionType extends SelectOption>({
164
163
} ;
165
164
166
165
return (
167
- < Container size = { size || 'md' } width = { props . width } className = { className } >
166
+ < Container size = { size || 'md' } width = { props . width } >
168
167
{ label && < SelectLabel onClick = { handleSelectClick } > { label } </ SelectLabel > }
169
168
< Dropdown
170
169
open = { isOpen }
Original file line number Diff line number Diff line change @@ -59,6 +59,19 @@ const meta: Meta = {
59
59
defaultValue : { summary : selectDefaults . showSearch ?. toString ( ) } ,
60
60
} ,
61
61
} ,
62
+ onSearch : {
63
+ description : 'Called when text in the search bar changed' ,
64
+ } ,
65
+ filteringPredicate : {
66
+ description :
67
+ 'A function to replace default filtering predicate. The default predicate supports only string labels.' ,
68
+ table : {
69
+ type : {
70
+ summary : 'FilteringPredicate' ,
71
+ detail : '(option: Option, query: string) => boolean' ,
72
+ } ,
73
+ } ,
74
+ } ,
62
75
isDisabled : {
63
76
description : 'Whether the Select component is disabled.' ,
64
77
control : {
Original file line number Diff line number Diff line change @@ -66,7 +66,6 @@ export const SimpleSelect = <OptionType extends SelectOption>({
66
66
optionSwitchable,
67
67
selectLabelProps,
68
68
filteringPredicate,
69
- className,
70
69
...props
71
70
} : SelectProps < OptionType > ) => {
72
71
const [ searchQuery , setSearchQuery ] = useState ( '' ) ;
@@ -141,7 +140,6 @@ export const SimpleSelect = <OptionType extends SelectOption>({
141
140
width = { props . width || 255 }
142
141
$selectLabelVariant = { selectLabelProps ?. variant }
143
142
isSelected = { selectedValues . length > 0 }
144
- className = { className }
145
143
>
146
144
{ label && < SelectLabel onClick = { handleSelectClick } > { label } </ SelectLabel > }
147
145
< Dropdown
Original file line number Diff line number Diff line change @@ -32,9 +32,7 @@ export interface SelectProps<Option extends SelectOption = SelectOption> {
32
32
icon ?: IconNames ;
33
33
showSearch ?: boolean ;
34
34
onSearch ?: ( query : string ) => void ;
35
- // searchFilter?: (query: string, options: Option[]) => Option[];
36
35
filteringPredicate ?: FilteringPredicate < Option > ;
37
- // onSearchQueryChanged?: (query: string) => void;
38
36
isDisabled ?: boolean ;
39
37
isReadOnly ?: boolean ;
40
38
isRequired ?: boolean ;
@@ -49,7 +47,6 @@ export interface SelectProps<Option extends SelectOption = SelectOption> {
49
47
optionListTestId ?: string ;
50
48
optionSwitchable ?: boolean ;
51
49
selectLabelProps ?: SelectLabelProps ;
52
- className ?: string ;
53
50
}
54
51
55
52
export interface SelectStyleProps {
You can’t perform that action at this time.
0 commit comments