Skip to content

refactor: make ComboboxArea component reusable#48

Merged
fityannugroho merged 1 commit intomainfrom
refactor-combobox-area
Dec 3, 2024
Merged

refactor: make ComboboxArea component reusable#48
fityannugroho merged 1 commit intomainfrom
refactor-combobox-area

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
@vercel
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
@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