# Modifying search results

**URL:** <https://meta.discourse.org/t/modifying-search-results/258897>\
**Category:** Development\
**Created:** [March 21, 2023, 2:37pm UTC](https://meta.discourse.org/t/modifying-search-results/258897 "2023-03-21T14:37:27Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [March 21, 2023, 2:37pm UTC](https://meta.discourse.org/t/modifying-search-results/258897/1 "2023-03-21T14:37:28Z")

</div>

I want to be able to tweak some of the styling in the search results (dropdown from the magnifying class in the top right). Now that seems to generate components on the fly (in `app/assets/javascripts/discourse/app/lib/search.js`) instead of using a template. I seem to be unable to do

```plaintext
      api.modifyClass("component:search-result-post", {
        didInsertElement() {
          this._super(...arguments);

        },
      });

```

or something similar.

How can I get a trigger/event and modify some of the generated HTML ?

---

_[View the full topic](https://meta.discourse.org/t/modifying-search-results/258897)._
