File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
frontend/src/components/ChipsInput
server/api/views/listMeds Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,6 @@ const ChipsInput: React.FC<ChipsInputProps> = ({
5959
6060 const handleSuggestionClick = ( selected : string ) => {
6161 onChange ( [ ...value , selected ] ) ;
62- setInputFocused ( false ) ; // Close dropdown after selection
6362 setInputValue ( "" ) ;
6463 } ;
6564
@@ -131,7 +130,10 @@ const ChipsInput: React.FC<ChipsInputProps> = ({
131130 { filteredSuggestions . map ( ( item , idx ) => (
132131 < li
133132 key = { idx }
134- onClick = { ( ) => handleSuggestionClick ( item ) }
133+ onMouseDown = { ( e ) => {
134+ e . preventDefault ( ) ;
135+ handleSuggestionClick ( item )
136+ } }
135137 className = "px-3 py-2 cursor-pointer hover:bg-gray-100 text-sm"
136138 >
137139 { item }
Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ def post(self, request):
4242 return Response ({'error' : 'Diagnosis not found' }, status = status .HTTP_404_NOT_FOUND )
4343 meds = {'first' : [], 'second' : [], 'third' : []}
4444
45+ priorMeds = data .get ('priorMedications' , "" ).split (',' )
46+ exclude_result .extend ([med .strip () for med in priorMeds if med .strip ()])
4547 included_set = set (include_result )
4648 excluded_set = set (exclude_result )
4749
You can’t perform that action at this time.
0 commit comments