Skip to content

Commit

Permalink
Keep search text (#5528)
Browse files Browse the repository at this point in the history
* changed the file name of exported file

* Search query is not emptied when focus is out of input

* retained the old changes

* keep search text in input feild

* All listed facilities will be displayed

* removed unwanted expression

* added props.onBlur

---------

Co-authored-by: Rithvik Nishad <rithvik.nishad@egovernments.org>
Co-authored-by: Khavin Shankar <khavinshankar@gmail.com>
  • Loading branch information
3 people committed May 30, 2023
1 parent b14dae0 commit 01354f4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Components/Form/AutoCompleteAsync.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ const AutoCompleteAsync = (props: Props) => {
}
onChange={({ target }) => setQuery(target.value)}
onFocus={props.onFocus}
onBlur={props.onBlur}
onBlur={() => {
setQuery("");
props.onBlur?.();
}}
autoComplete="off"
/>
<Combobox.Button className="absolute inset-y-0 right-0 flex items-center pr-2">
Expand Down

0 comments on commit 01354f4

Please sign in to comment.