loaders, outSelectClose, notifications
This commit is contained in:
@ -56,6 +56,7 @@ export const PartnerAddRequest = () => {
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
initListeners();
|
||||
apiRequest(`/profile/positions-list`).then((el) =>
|
||||
setSpecializationList(el)
|
||||
);
|
||||
@ -141,6 +142,31 @@ export const PartnerAddRequest = () => {
|
||||
}
|
||||
};
|
||||
|
||||
const initListeners = () => {
|
||||
document.addEventListener("click", closeByClickingOut);
|
||||
};
|
||||
|
||||
const closeByClickingOut = (event) => {
|
||||
const path = event.path || (event.composedPath && event.composedPath());
|
||||
|
||||
if (
|
||||
event &&
|
||||
!path.find(
|
||||
(div) =>
|
||||
div.classList &&
|
||||
(div.classList.contains("form__block__section__selects") ||
|
||||
div.classList.contains("form__block__dropDown")
|
||||
|| div.classList.contains("form__block__skills") ||
|
||||
div.classList.contains("form__block__section__select"))
|
||||
)
|
||||
) {
|
||||
setOpenSkillsSelect(false)
|
||||
setOpenSpecializationListOpen(false)
|
||||
setOpenLevelList(false)
|
||||
setOpenCountList(false)
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="partnerAddRequest">
|
||||
<ProfileHeader />
|
||||
|
Reference in New Issue
Block a user