Implemented issue drag and drop

This commit is contained in:
ireic
2019-12-14 01:20:54 +01:00
parent 73b4ff97b2
commit f48b2a9d40
17 changed files with 453 additions and 181 deletions

View File

@@ -40,7 +40,7 @@ const Modal = ({
const modalIdRef = useRef(uniqueIncreasingIntegerId());
const closeModal = useCallback(() => {
if (shouldNotCloseBecauseHasOpenChildModal(modalIdRef.current)) {
if (hasChildModal(modalIdRef.current)) {
return;
}
if (!isControlled) {
@@ -80,8 +80,7 @@ const getIdsOfAllOpenModals = () => {
return $modalNodes.map($node => parseInt($node.getAttribute('data-jira-modal-id')));
};
const shouldNotCloseBecauseHasOpenChildModal = modalId =>
getIdsOfAllOpenModals().some(id => id > modalId);
const hasChildModal = modalId => getIdsOfAllOpenModals().some(id => id > modalId);
const setBodyScrollLock = () => {
const areAnyModalsOpen = getIdsOfAllOpenModals().length > 0;