Skip to content

Commit 183eaf2

Browse files
author
Haider Alshamma
committed
fix: exclude only overridden types
1 parent e47cf69 commit 183eaf2

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

src/Select/Select.story.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export const WithDifferentSizes = () => {
111111
<Heading2>Standard</Heading2>
112112
<Flex gap="x2" minHeight="360px">
113113
<Select
114-
defaultMenuIsOpen
114+
initialIsOpen
115115
placeholder="Please select inventory status"
116116
onChange={action("selection changed")}
117117
onBlur={action("blurred")}
@@ -121,7 +121,7 @@ export const WithDifferentSizes = () => {
121121
/>
122122
<Select
123123
size="medium"
124-
defaultMenuIsOpen
124+
initialIsOpen
125125
placeholder="Please select inventory status"
126126
onChange={action("selection changed")}
127127
onBlur={action("blurred")}
@@ -131,7 +131,7 @@ export const WithDifferentSizes = () => {
131131
/>
132132
<Select
133133
size="large"
134-
defaultMenuIsOpen
134+
initialIsOpen
135135
placeholder="Please select inventory status"
136136
onChange={action("selection changed")}
137137
onBlur={action("blurred")}
@@ -144,7 +144,7 @@ export const WithDifferentSizes = () => {
144144
<Heading2>Multi-select</Heading2>
145145
<Flex gap="x2" alignItems="flex-start">
146146
<Select
147-
defaultMenuIsOpen
147+
initialIsOpen
148148
defaultValue={[partnerCompanyName[0].value, partnerCompanyName[2].value]}
149149
noOptionsMessage={() => "No options"}
150150
placeholder="Please select inventory status"
@@ -154,7 +154,7 @@ export const WithDifferentSizes = () => {
154154
/>
155155
<Select
156156
size="medium"
157-
defaultMenuIsOpen
157+
initialIsOpen
158158
defaultValue={[partnerCompanyName[0].value, partnerCompanyName[2].value]}
159159
noOptionsMessage={() => "No options"}
160160
placeholder="Please select inventory status"
@@ -164,7 +164,7 @@ export const WithDifferentSizes = () => {
164164
/>
165165
<Select
166166
size="large"
167-
defaultMenuIsOpen
167+
initialIsOpen
168168
defaultValue={[partnerCompanyName[0].value, partnerCompanyName[2].value]}
169169
noOptionsMessage={() => "No options"}
170170
placeholder="Please select inventory status"

src/Select/Select.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ type CustomProps<IsMulti extends boolean, Group extends GroupBase<NDSOption>> =
5353
export type NDSSelectProps<
5454
IsMulti extends boolean = boolean,
5555
Group extends GroupBase<NDSOption> = GroupBase<NDSOption>
56-
> = Omit<Props<NDSOption, IsMulti, Group>, keyof CustomProps<IsMulti, Group>> & CustomProps<IsMulti, Group>;
56+
> = Omit<
57+
Props<NDSOption, IsMulti, Group>,
58+
keyof CustomProps<IsMulti, Group> | "isSearchable" | "isDisabled" | "defaultMenuIsOpen" | "isMulti"
59+
> &
60+
CustomProps<IsMulti, Group>;
5761

5862
const NDSSelect = forwardRef(
5963
<IsMulti extends boolean = boolean, Group extends GroupBase<NDSOption> = GroupBase<NDSOption>>(

0 commit comments

Comments
 (0)