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: improve useSelect hook item render #732

Merged
merged 6 commits into from
Jun 3, 2024

Conversation

hamed-musallam
Copy link
Contributor

In some cases, we need more than just text in the menu items, we require additional elements, as seen in the workspaces dropdown menu in NMRium. Therefore, I suggest enhancing the useSelect hook to support custom item rendering. I don't want to replace the entire MenuItem; I just need the ability to customize its content.

@hamed-musallam hamed-musallam changed the title feat: improve use select hook item render feat: improve useSelect hook item render May 28, 2024
Copy link

cloudflare-workers-and-pages bot commented May 28, 2024

Deploying react-science with  Cloudflare Pages  Cloudflare Pages

Latest commit: ae4ff19
Status: ✅  Deploy successful!
Preview URL: https://b1691700.react-science.pages.dev
Branch Preview URL: https://improve-use-select-hook-item.react-science.pages.dev

View logs

@hamed-musallam hamed-musallam force-pushed the improve-use-select-hook-item-render branch from 3887ed5 to b7d97cd Compare May 28, 2024 10:56
Copy link
Contributor

@stropitek stropitek left a comment

Choose a reason for hiding this comment

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

LGTM modulo my review comment.

src/components/hooks/useSelect.tsx Outdated Show resolved Hide resolved
src/components/hooks/useSelect.tsx Outdated Show resolved Hide resolved
@hamed-musallam hamed-musallam merged commit 76ac3f4 into main Jun 3, 2024
12 checks passed
@hamed-musallam hamed-musallam deleted the improve-use-select-hook-item-render branch June 3, 2024 08:24
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