Skip to content

Commit f51c161

Browse files
committed
Add default select option
1 parent 10de49f commit f51c161

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

development/src/ant-phone/index.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,16 @@ const PhoneInput = forwardRef(({
222222
</div>
223223
)}
224224
>
225+
<Select.Option
226+
children={null}
227+
value={selectValue}
228+
style={{display: "none"}}
229+
key={`${countryCode}_default`}
230+
label={<>
231+
<div className={`flag ${countryCode}`}/>
232+
{suffixIcon}
233+
</>}
234+
/>
225235
{countriesList.map(([iso, name, dial, pattern]) => {
226236
const mask = disableParentheses ? pattern.replace(/[()]/g, "") : pattern;
227237
return (

0 commit comments

Comments
 (0)