diff --git a/src/components/UI/DialogBox/DialogBox.module.css b/src/components/UI/DialogBox/DialogBox.module.css index 8b20283df..cd67dce23 100644 --- a/src/components/UI/DialogBox/DialogBox.module.css +++ b/src/components/UI/DialogBox/DialogBox.module.css @@ -13,6 +13,7 @@ min-width: 459px; margin: 0 auto; height: unset !important; + max-height: 90% !important; } .Dialogbox Form { diff --git a/src/components/UI/Form/AutoComplete/AutoComplete.tsx b/src/components/UI/Form/AutoComplete/AutoComplete.tsx index 539dbfd75..9fea85e3e 100644 --- a/src/components/UI/Form/AutoComplete/AutoComplete.tsx +++ b/src/components/UI/Form/AutoComplete/AutoComplete.tsx @@ -88,7 +88,7 @@ export const AutoComplete: React.SFC = ({ if (roleSelection) { roleSelection(value); } - if (asyncSearch) { + if (asyncSearch && value.length > 0) { const filterValues = asyncValues.value.filter( (val: any) => val.id !== value[value.length - 1].id ); @@ -100,6 +100,9 @@ export const AutoComplete: React.SFC = ({ setSearchTerm(''); onChange(''); } + if (asyncSearch && value.length === 0) { + asyncValues.setValue([]); + } if (onChange) { onChange(value); } diff --git a/src/containers/Group/GroupList/GroupList.tsx b/src/containers/Group/GroupList/GroupList.tsx index f81e51daa..cbeb0f367 100644 --- a/src/containers/Group/GroupList/GroupList.tsx +++ b/src/containers/Group/GroupList/GroupList.tsx @@ -225,7 +225,9 @@ export const GroupList: React.SFC = () => { asyncSearch selectedOptions={groupContacts} onChange={(value: any) => { - setContactSearchTerm(value); + if (typeof value === 'string') { + setContactSearchTerm(value); + } }} /> );