From d4ea593d0abd6eafee89d3e4417deb42728c2657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CAkula?= Date: Thu, 11 May 2023 18:10:43 +0530 Subject: [PATCH] fix(disablePhonetypes): Disable Phone Types --- .../@webex/widget-speed-dial/src/SpeedDialForm.tsx | 5 +++-- .../@webex/widget-speed-dial/src/SpeedDialForm.types.tsx | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/node_modules/@webex/widget-speed-dial/src/SpeedDialForm.tsx b/packages/node_modules/@webex/widget-speed-dial/src/SpeedDialForm.tsx index 7365a1ec3..6db760673 100644 --- a/packages/node_modules/@webex/widget-speed-dial/src/SpeedDialForm.tsx +++ b/packages/node_modules/@webex/widget-speed-dial/src/SpeedDialForm.tsx @@ -50,7 +50,8 @@ export const SpeedDialForm = ({ onSubmit = undefined, onCancel = undefined, isEdit = false, - isContact = false + isContact = false, + usedPhonesList = [], }: ISpeedDialFormProps) => { const [cssClasses, sc] = useWebexClasses('speed-dial-form', undefined, { isContact, @@ -173,7 +174,7 @@ export const SpeedDialForm = ({ width: '100%', }} label={t('form.phone.label')} - disabledKeys={[formData?.phoneType as React.Key]} + disabledKeys={usedPhonesList} defaultSelectedKey={ formData?.phoneType || formData?.mobilePhone } diff --git a/packages/node_modules/@webex/widget-speed-dial/src/SpeedDialForm.types.tsx b/packages/node_modules/@webex/widget-speed-dial/src/SpeedDialForm.types.tsx index 83a1d5990..ac0efad39 100644 --- a/packages/node_modules/@webex/widget-speed-dial/src/SpeedDialForm.types.tsx +++ b/packages/node_modules/@webex/widget-speed-dial/src/SpeedDialForm.types.tsx @@ -15,6 +15,7 @@ export interface ISpeedDialFormProps { children?: React.ReactNode; isContact?: boolean; isEdit?: boolean; + usedPhonesList?: string[]; } export interface ISelectItems {