@@ -183,6 +183,18 @@ const PhoneInput = forwardRef(({
183
183
setValue ( formattedNumber ) ;
184
184
} , [ countriesList , metadata , onMount , pattern , setValue , value ] )
185
185
186
+ const suffixIcon = useMemo ( ( ) => {
187
+ return enableArrow && (
188
+ < span role = "img" className = "anticon" style = { { paddingLeft : 8 } } >
189
+ < svg className = "icon" viewBox = "0 0 1024 1024"
190
+ focusable = "false" fill = "currentColor" width = "16" height = "18" >
191
+ < path
192
+ d = "M848 368a48 48 0 0 0-81.312-34.544l-0.016-0.016-254.784 254.784-251.488-251.488a48 48 0 1 0-71.04 64.464l-0.128 0.128 288 288 0.016-0.016a47.84 47.84 0 0 0 34.544 14.688h0.224a47.84 47.84 0 0 0 34.544-14.688l0.016 0.016 288-288-0.016-0.016c8.32-8.624 13.44-20.368 13.44-33.312z" />
193
+ </ svg >
194
+ </ span >
195
+ ) ;
196
+ } , [ enableArrow ] )
197
+
186
198
const countriesSelect = useMemo ( ( ) => (
187
199
< Select
188
200
suffixIcon = { null }
@@ -240,15 +252,7 @@ const PhoneInput = forwardRef(({
240
252
key = { `${ iso } _${ mask } ` }
241
253
label = { < >
242
254
< div className = { `flag ${ iso } ` } />
243
- { enableArrow && (
244
- < span role = "img" className = "anticon" style = { { paddingLeft : 8 } } >
245
- < svg className = "icon" viewBox = "0 0 1024 1024"
246
- focusable = "false" fill = "currentColor" width = "16" height = "18" >
247
- < path
248
- d = "M848 368a48 48 0 0 0-81.312-34.544l-0.016-0.016-254.784 254.784-251.488-251.488a48 48 0 1 0-71.04 64.464l-0.128 0.128 288 288 0.016-0.016a47.84 47.84 0 0 0 34.544 14.688h0.224a47.84 47.84 0 0 0 34.544-14.688l0.016 0.016 288-288-0.016-0.016c8.32-8.624 13.44-20.368 13.44-33.312z" />
249
- </ svg >
250
- </ span >
251
- ) }
255
+ { suffixIcon }
252
256
</ > }
253
257
children = { < div className = { `${ prefixCls } -phone-input-select-item` } >
254
258
< div className = { `flag ${ iso } ` } />
@@ -258,7 +262,7 @@ const PhoneInput = forwardRef(({
258
262
)
259
263
} ) }
260
264
</ Select >
261
- ) , [ selectValue , query , enableArrow , disabled , disableParentheses , disableDropdown , onDropdownVisibleChange , minWidth , searchNotFound , countries , countriesList , setFieldValue , setValue , prefixCls , enableSearch , searchPlaceholder ] )
265
+ ) , [ selectValue , suffixIcon , countryCode , query , disabled , disableParentheses , disableDropdown , onDropdownVisibleChange , minWidth , searchNotFound , countries , countriesList , setFieldValue , setValue , prefixCls , enableSearch , searchPlaceholder ] )
262
266
263
267
return (
264
268
< div className = { `${ prefixCls } -phone-input-wrapper` }
0 commit comments