INFRA-2867 | fix dropdown length
This commit is contained in:
@@ -158,3 +158,6 @@
|
||||
width: 321px !important;
|
||||
min-height: unset;
|
||||
}
|
||||
.create-incident-single-selector + div {
|
||||
max-height: 300px;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,9 @@ const useCreateIncidentHelper = (
|
||||
|
||||
dispatch({
|
||||
type: actionTypes.SET_SELECTED_TEAM,
|
||||
payload: [productListData?.defaultProduct] || [],
|
||||
payload: productListData?.defaultProduct
|
||||
? [productListData?.defaultProduct]
|
||||
: [],
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ const ProductSelector: React.FC<ProductSelectorProps> = (
|
||||
return (
|
||||
<AutoComplete
|
||||
options={options}
|
||||
selectedOptions={selected.map(option => option.value)}
|
||||
selectedOptions={selected?.map(option => option?.value)}
|
||||
variant="bordered"
|
||||
updateOnChipRemoval={handleChipRemoval}
|
||||
updateClearAllCallback={handleClearAll}
|
||||
|
||||
@@ -35,7 +35,7 @@ const useIncidentFormApi = () => {
|
||||
|
||||
const fetchAssignerAndResponder = (product: number[]) => {
|
||||
try {
|
||||
dispatch(fetchAssignerAndResponderData(product));
|
||||
if (product.length > 0) dispatch(fetchAssignerAndResponderData(product));
|
||||
} catch (error) {
|
||||
toast.error(
|
||||
'Something went wrong with assigner and responder data. Please try again later',
|
||||
|
||||
@@ -24,7 +24,7 @@ const UpdateIncidentBox: FC = () => {
|
||||
useEffect(() => {
|
||||
if (productOptions?.length > 0) {
|
||||
fetchAssignerAndResponder(
|
||||
productOptions?.map((product: Team) => product.value),
|
||||
productOptions?.map((product: Team) => product?.value),
|
||||
);
|
||||
}
|
||||
}, [productOptions]);
|
||||
|
||||
Reference in New Issue
Block a user