Skip to content

Commit

Permalink
[#143] feat: Modal띄운 후 다른 블록으로 이동시 close
Browse files Browse the repository at this point in the history
  • Loading branch information
YiSoJeong committed Dec 19, 2020
1 parent c0ece2d commit 65c9c04
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions frontend/src/components/atoms/BlockContent/BlockContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -277,13 +277,21 @@ function BlockContent(blockDTO: Block) {
event.preventDefault();
};

const onBlurHandler = () => {
setModal({
...modal,
isOpen: false,
});
};

return (
<div
css={blockContentCSS}
onDragOver={dragOverHandler}
onDrop={dropHandler}
onDragEnter={() => setDragOverToggle(true)}
onDragLeave={() => setDragOverToggle(false)}
onBlur={onBlurHandler}
>
{listBlockType(blockDTO, listCnt.current)}
<div
Expand Down

0 comments on commit 65c9c04

Please sign in to comment.