Skip to content

Fix view button dropdown not showing iin front.#81

Merged
mkbula merged 2 commits into
mkbula:masterfrom
himsin:viewBug
May 14, 2026
Merged

Fix view button dropdown not showing iin front.#81
mkbula merged 2 commits into
mkbula:masterfrom
himsin:viewBug

Conversation

@himsin
Copy link
Copy Markdown
Contributor

@himsin himsin commented May 11, 2026

No description provided.

@mkbula
Copy link
Copy Markdown
Owner

mkbula commented May 13, 2026

  1. I don't like use effect here - it's unnecessary. A better pattern would be something like:
function handleToggle() {
  if (open) { setOpen(false); return }
  const rect = buttonRef.current?.getBoundingClientRect()
  if (rect) setPos({ top: rect.bottom, right: window.innerWidth - rect.right })
  setOpen(true)
}
  1. dead code - dropdownRef and wrapper attributes

Please make sure to run all checks before submitting, including formatting.

@himsin
Copy link
Copy Markdown
Contributor Author

himsin commented May 13, 2026

@mkbula Replaced useEffect with a handleToggle() function that computes position on click

@mkbula mkbula merged commit 148c7b2 into mkbula:master May 14, 2026
2 checks passed
@himsin himsin deleted the viewBug branch May 14, 2026 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants