File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import {getStatusClassNames} from "antd/lib/_util/statusUtils";
77import InputLegacy from "./legacy" ;
88import { PhoneInputProps } from "./types" ;
99
10- const PhoneInput = ( InputLegacyProps : PhoneInputProps ) => {
10+ const PhoneInput = ( inputLegacyProps : PhoneInputProps ) => {
1111 const { token} = theme . useToken ( ) ;
1212 const { status} : any = useContext ( FormItemInputContext ) ;
1313 const [ _1 , inputCls ] = genComponentStyleHook ( "ant-input" ) ;
@@ -20,6 +20,7 @@ const PhoneInput = (InputLegacyProps: PhoneInputProps) => {
2020 const dropdownClass = useMemo ( ( ) => "ant-dropdown " + dropdownCls , [ dropdownCls ] ) ;
2121
2222 useEffect ( ( ) => {
23+ /** Load antd 5.x styles dynamically observing the theme change */
2324 for ( let styleSheet of document . styleSheets ) {
2425 let rule : any ;
2526 for ( rule of styleSheet . cssRules || styleSheet . rules ) {
@@ -62,7 +63,7 @@ const PhoneInput = (InputLegacyProps: PhoneInputProps) => {
6263
6364 return (
6465 < InputLegacy
65- { ...InputLegacyProps }
66+ { ...inputLegacyProps }
6667 inputClass = { inputClass }
6768 dropdownClass = { dropdownClass }
6869 />
You can’t perform that action at this time.
0 commit comments