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

refactor: make ComboboxArea component reusable #48

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

fityannugroho
Copy link
Owner

@fityannugroho fityannugroho commented Dec 3, 2024

PR Checklist

Please check if your PR fulfills the following requirements:

  • I have read the documentation.
  • I have read and followed the Contributing Guidelines.
  • I have included a pull request description of my changes.
  • I have included the necessary changes to the documentation.
  • I have added tests to cover my changes.

PR Type

What kind of change does this PR introduce?

  • Bug fix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes

What is the current behavior?

Currently ComboboxArea component depends to the useMapDashboard hook to handle the selected option, so that it must be implemented under MapDashboardProvider only.

What is the new behavior?

  • Untied ComboboxArea component dependence to the useMapDashboard hook. Replace it with inner useState.
  • Apply useMemo to memoize the options.
  • Remove properties override for autoClose and fullWidth. Now it must be set explicitly.
  • Move ComboboxArea.tsx file to components directory.

@fityannugroho fityannugroho added the refactor Change code without add, update, or delete any features label Dec 3, 2024
Copy link

vercel bot commented Dec 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
idn-area-map ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 3, 2024 8:07am

@fityannugroho fityannugroho merged commit 409338e into main Dec 3, 2024
7 checks passed
@fityannugroho fityannugroho deleted the refactor-combobox-area branch December 3, 2024 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Change code without add, update, or delete any features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant