Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat/#76] 글감, 필명 드롭다운 퍼블리싱 #86

Merged
merged 13 commits into from
Jan 14, 2024

Conversation

se0jinYoon
Copy link
Contributor

@se0jinYoon se0jinYoon commented Jan 13, 2024

✨ 해당 이슈 번호 ✨

closes #76

todo

  • 글감, 필명 드롭다운 퍼블리싱

📌 내가 알게 된 부분

  • 드롭다운 열리고 닫히는 상태를 글감과 필명에 대해서 한 번에 관리하고 싶었는데 오히려 두 개의 다른 컴포넌트여서 (드롭다운 형식이 달라 재사용하기에 적합하지 않음) 따로 관리하는게 맞다고 판단하여 따로 관리하고 커스텀 훅 쓰는 걸로 구현하였습니다 ~

📌 질문할 부분

  • 혹시 ref 영역 선택 문제... 에 대해 아시는지 ..

📌스크린샷(선택)

2024-01-14.8.53.56.mov

## 문제
저 영역을 눌러도 드롭다운이 닫히는 이슈가 있습니다.... 공사중 ..
-> 해결 완료

2024-01-14.8.54.32.mov

새로운 문제

아래 화살표를 정확하게 클릭하면 드롭다운이 안 열려요 .. 공사중 ..

@se0jinYoon se0jinYoon added ✨ Feature 새로운 기능 추가 (새로운 구현) 서진 labels Jan 13, 2024
@se0jinYoon se0jinYoon self-assigned this Jan 13, 2024
@github-actions github-actions bot added the size/m size/m label Jan 13, 2024
Copy link
Member

@namdaeun namdaeun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


// 이벤트 지워주기
return () => {
document.removeEventListener('click', handleClickOutside);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p5) 요런 것도 있군요,, 배워갑니다🤩

Copy link
Contributor

@moondda moondda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm~....🙏

const useClickOutside = (ref: React.RefObject<HTMLElement>, callback: () => void) => {
useEffect(() => {
const handleClickOutside = (event: MouseEvent) => {
// 드롭다운이 열려있고, 드롭다운 외부가 클릭됐을 경우
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p5) 주석왕 윤서진...진짜 나도 습관들이고싶다

Copy link
Member

@ljh0608 ljh0608 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ljh0608 ljh0608 merged commit 72ca473 into develop Jan 14, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feature 새로운 기능 추가 (새로운 구현) size/m size/m 서진
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ Feat ] 에디터 뷰 드롭다운 구현
4 participants