pastelsky / bundlephobia

🏋️ Find out the cost of adding a new frontend dependency to your project
https://bundlephobia.com
MIT License
9.02k stars 223 forks source link

fix: clear suggestions if the input field is an empty string. #726

Closed vlmlee closed 1 year ago

vlmlee commented 1 year ago

Issue

The autocomplete input will remember suggestions made even after clearing the input field.

Solution

Clear the suggestions state variable if the input field is an empty string.

pastelsky commented 1 year ago

Thanks for raising a fix!