File tree 2 files changed +10
-9
lines changed
packages/react-search-select
2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ const Demo = () => {
51
51
< Row>
52
52
< SearchSelect
53
53
mode= " multiple"
54
- style= {{ width: 176 }}
54
+ style= {{ width: 200 }}
55
55
showSearch= {true }
56
56
labelInValue= {true }
57
57
maxTagCount= {6 }
@@ -72,7 +72,7 @@ const Demo = () => {
72
72
< Row>
73
73
< SearchSelect
74
74
mode= " single"
75
- style= {{ width: 176 }}
75
+ style= {{ width: 200 }}
76
76
showSearch= {true }
77
77
labelInValue= {true }
78
78
maxTagCount= {6 }
@@ -196,12 +196,12 @@ const Demo = () => {
196
196
>
197
197
{({ fields, state, canSubmit }) => {
198
198
return (
199
- < div>
200
- < Row gutter = { 20 } >
201
- < Col fixed> {fields .selectField }< / Col>
199
+ < div style = {{ marginLeft : 10 }} >
200
+ < Row >
201
+ < Col fixed style = {{width : 200 }} > {fields .selectField }< / Col>
202
202
< / Row>
203
- < Row gutter = { 20 } >
204
- < Col fixed> {fields .selectSingle }< / Col>
203
+ < Row>
204
+ < Col fixed style = {{width : 200 }} > {fields .selectSingle }< / Col>
205
205
< / Row>
206
206
< Row>
207
207
< Col fixed>
Original file line number Diff line number Diff line change @@ -209,6 +209,7 @@ export default function SearchSelect(props: SearchSelectProps) {
209
209
className = { cls }
210
210
trigger = "click"
211
211
style = { { marginTop : 5 } }
212
+ overlayStyl = { { width : 100 } }
212
213
disabled = { option && option . length > 0 ? false : true }
213
214
{ ...others }
214
215
onVisibleChange = { onVisibleChange }
@@ -219,9 +220,9 @@ export default function SearchSelect(props: SearchSelectProps) {
219
220
style = { {
220
221
minHeight : 25 ,
221
222
maxHeight : 280 ,
222
- minWidth : 200 ,
223
+ minWidth : style ?. width ?? 200 ,
223
224
overflowY : 'scroll' ,
224
- width : divRef . current ? divRef . current . offsetWidth : 'auto' ,
225
+ width : style ?. width ,
225
226
} }
226
227
>
227
228
{ ! option || option . length === 0 ? (
You can’t perform that action at this time.
0 commit comments