Skip to content

Convert the drop-down into the text field with suggestions in medicines update and medicine verify page and in the prescription page

Bikkumalla Sai Krishna requested to merge remove-drop-down into develop

#172 (closed)

🚀 Feature Enhancement: Replace Medicine Dropdown with Searchable Autocomplete

📌 Overview

Improved the medicine selection experience in the Update Prescription page by replacing the traditional dropdown menu with a searchable autocomplete input field.

This enhancement provides a faster, more scalable, and user-friendly way to select medicines, especially when dealing with large datasets.


🛠 What Was Changed

  • Removed the static <select> dropdown used for medicine selection.
  • Introduced a controlled text input with dynamic search suggestions.
  • Implemented real-time filtering of medicines as the user types.
  • Added intelligent ranking for more accurate suggestions.
  • Limited visible results to top matches for better usability.
  • Maintained the same state binding and backend payload structure.

🎯 Why This Change Was Needed

The previous dropdown approach had limitations:

  • Difficult to use with large medicine lists.
  • Required excessive scrolling.
  • Slower selection process.
  • Not scalable as the dataset grows.

The new searchable autocomplete:

  • Improves selection speed.
  • Reduces cognitive load.
  • Enhances user experience.
  • Scales efficiently for large medicine inventories.
  • Provides a modern and intuitive UI interaction.

🔒 Backward Compatibility

This change was implemented without affecting:

  • Form submission logic
  • Backend payload structure
  • Validation logic
  • Business rules
  • Existing state management

All previous functionality remains fully intact.


🧠 Technical Highlights

  • Controlled React input component
  • Optimized filtering using memoization
  • Case-insensitive matching
  • Ranked search results
  • Keyboard navigation support
  • Accessible suggestion list (ARIA compliant)
  • Dark theme compatible styling

📈 Impact

This update significantly enhances usability and prepares the system for handling larger medicine datasets while maintaining system stability and performance.


Status: Completed
Type: UI/UX Enhancement
Risk Level: Low (UI-only improvement, no backend changes)

Edited by Bikkumalla Sai Krishna

Merge request reports

Loading