[MobileSendPopUp] open focus 비동기처리
This commit is contained in:
@@ -1,63 +1,44 @@
|
|||||||
import React, {
|
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
||||||
useCallback,
|
|
||||||
useEffect,
|
|
||||||
useMemo,
|
|
||||||
useState,
|
|
||||||
} from 'react';
|
|
||||||
|
|
||||||
import classNames from 'classnames';
|
import classNames from "classnames";
|
||||||
import {
|
import {
|
||||||
AsYouTypeFormatter,
|
AsYouTypeFormatter,
|
||||||
PhoneNumberFormat,
|
PhoneNumberFormat,
|
||||||
PhoneNumberUtil,
|
PhoneNumberUtil,
|
||||||
} from 'google-libphonenumber';
|
} from "google-libphonenumber";
|
||||||
import {
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
useDispatch,
|
|
||||||
useSelector,
|
|
||||||
} from 'react-redux';
|
|
||||||
|
|
||||||
import {
|
import { off, on } from "@enact/core/dispatcher";
|
||||||
off,
|
import spotlight, { Spotlight } from "@enact/spotlight";
|
||||||
on,
|
import { SpotlightContainerDecorator } from "@enact/spotlight/SpotlightContainerDecorator";
|
||||||
} from '@enact/core/dispatcher';
|
import { Spottable } from "@enact/spotlight/Spottable";
|
||||||
import spotlight, { Spotlight } from '@enact/spotlight';
|
|
||||||
import {
|
|
||||||
SpotlightContainerDecorator,
|
|
||||||
} from '@enact/spotlight/SpotlightContainerDecorator';
|
|
||||||
import { Spottable } from '@enact/spotlight/Spottable';
|
|
||||||
|
|
||||||
import defaultImage from '../../../assets/images/img-thumb-empty-144@3x.png';
|
import defaultImage from "../../../assets/images/img-thumb-empty-144@3x.png";
|
||||||
import { types } from '../../actions/actionTypes';
|
import { types } from "../../actions/actionTypes";
|
||||||
import {
|
import { clearSMS, sendSms } from "../../actions/appDataActions";
|
||||||
clearSMS,
|
|
||||||
sendSms,
|
|
||||||
} from '../../actions/appDataActions';
|
|
||||||
import {
|
import {
|
||||||
changeLocalSettings,
|
changeLocalSettings,
|
||||||
setHidePopup,
|
setHidePopup,
|
||||||
setShowPopup,
|
setShowPopup,
|
||||||
} from '../../actions/commonActions';
|
} from "../../actions/commonActions";
|
||||||
import {
|
import {
|
||||||
clearRegisterDeviceInfo,
|
clearRegisterDeviceInfo,
|
||||||
getDeviceAdditionInfo,
|
getDeviceAdditionInfo,
|
||||||
registerDeviceInfo,
|
registerDeviceInfo,
|
||||||
} from '../../actions/deviceActions';
|
} from "../../actions/deviceActions";
|
||||||
import {
|
import {
|
||||||
clearCurationCoupon,
|
clearCurationCoupon,
|
||||||
setEventIssueReq,
|
setEventIssueReq,
|
||||||
} from '../../actions/eventActions';
|
} from "../../actions/eventActions";
|
||||||
import useLogService from '../../hooks/useLogService';
|
import useLogService from "../../hooks/useLogService";
|
||||||
import {
|
import { ACTIVE_POPUP, LOG_TP_NO } from "../../utils/Config";
|
||||||
ACTIVE_POPUP,
|
import { $L } from "../../utils/helperMethods";
|
||||||
LOG_TP_NO,
|
import CustomImage from "../CustomImage/CustomImage";
|
||||||
} from '../../utils/Config';
|
import TButton from "../TButton/TButton";
|
||||||
import { $L } from '../../utils/helperMethods';
|
import TPopUp from "../TPopUp/TPopUp";
|
||||||
import CustomImage from '../CustomImage/CustomImage';
|
import HistoryPhoneNumber from "./HistoryPhoneNumber/HistoryPhoneNumber";
|
||||||
import TButton from '../TButton/TButton';
|
import css from "./MobileSendPopUp.module.less";
|
||||||
import TPopUp from '../TPopUp/TPopUp';
|
import SMSNumKeyPad from "./SMSNumKeyPad";
|
||||||
import HistoryPhoneNumber from './HistoryPhoneNumber/HistoryPhoneNumber';
|
|
||||||
import css from './MobileSendPopUp.module.less';
|
|
||||||
import SMSNumKeyPad from './SMSNumKeyPad';
|
|
||||||
|
|
||||||
const Container = SpotlightContainerDecorator(
|
const Container = SpotlightContainerDecorator(
|
||||||
{ enterTo: "last-focused" },
|
{ enterTo: "last-focused" },
|
||||||
@@ -503,11 +484,15 @@ export default function MobileSendPopUp({
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (keyPadOff) {
|
if (keyPadOff) {
|
||||||
Spotlight.focus("agreeAndSend");
|
setTimeout(() => {
|
||||||
|
Spotlight.focus("agreeAndSend");
|
||||||
|
});
|
||||||
setSpotlightDisabled(false);
|
setSpotlightDisabled(false);
|
||||||
} else {
|
} else {
|
||||||
setSpotlightDisabled(true);
|
setSpotlightDisabled(true);
|
||||||
Spotlight.focus("keypad-number-1");
|
setTimeout(() => {
|
||||||
|
Spotlight.focus("keypad-number-1");
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}, [keyPadOff]);
|
}, [keyPadOff]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user