DEV Community

Cover image for Quick access to my last searches on Codever
Adrian Matei for Codever

Posted on • Updated on

Quick access to my last searches on Codever

When looking for bookmarks or code snippets I recently used, I often find myself use the autocompletion capability of the search box to retrieve them. So over the weekend, I figured out since I do that, why not make it easier. So I did - I added sort of quick access to my last searches directly in the side menu on the landing page. See it in action below:

Access my last searches demo

One tricky part was how to show the whole content of the search query when its length passes a certain limit. That meant when hovering over it, dynamically change the content of the html anchor a element. On top of that the list is dynamically generated out of the last searches. I like challenges and I described in How to change the content of an html element on hover in Angular how I implemented this.

Another interesting aspect of the implementation was how to dynamically set the background color of the displayed search queries - this is described with the snippets and post at Set css class dynamically in Angular from expression

👉 Codever is a bookmarks and snippets manager for developers & co. Give it a try and start saving time and nerves right away.

Top comments (0)