# Existe um evento que é acionado quando as listas de tópicos são recarregadas?

**URL:** https://meta.discourse.org/t/is-there-an-event-that-fires-when-topic-lists-are-reloaded/78523
**Category:** Development
**Created:** [Janeiro 20, 2018, 6:22am UTC](https://meta.discourse.org/t/is-there-an-event-that-fires-when-topic-lists-are-reloaded/78523 "2018-01-20T06:22:08Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [Agosto 16, 2018, 4:17pm UTC](https://meta.discourse.org/t/is-there-an-event-that-fires-when-topic-lists-are-reloaded/78523/7 "2018-08-16T16:17:03Z")

</div>

This is a lot more than the images gallery (love that too, though, btw) This is an alternative for the topic list feed, no? Is there a public repository for what’s shown here?

I think the key thing here is that TLP uses a table, just like vanilla discourse, … so looks like I just have to modify topic-list-item and topic-list 🙂 :

```plaintext
<tbody>
  {{#each filteredTopics as |topic|}}
    {{topic-list-item topic=topic
<SNIP>
                      tagsForUser=tagsForUser}}
    {{raw "list/visited-line" lastVisitedTopic=lastVisitedTopic topic=topic}}
  {{/each}}
</tbody>

```

etc.

_masonry_ uses css grid presumably, which uses div tags … so I’m going with the assumption these were altered to use div tags … having a go myself but all pointers appreciated! (but I did find [this guide](https://meta.discourse.org/t/developer-s-guide-to-discourse-themes/93648#heading--4-b-2) which is very handy!)

OK I’ve reached a bit of an impasse:

I’ve edited both

- `topic-list.hbs`: (added to TLP plug-in so I can change `tbody` to `div`)

```plaintext
{{#if socialStyle}}
<div class='grid'>
  {{#each filteredTopics as |topic|}}
    {{topic-list-item topic=topic
                      bulkSelectEnabled=bulkSelectEnabled

```

and:

- `topic-list-item.raw.hbs` (taken from TLP plug-in but edited)

```plaintext
{{#if socialStyle}}
<div class='grid-item'>
    {{raw "list/topic-list-title" topic=topic socialStyle=socialStyle showTopicPostBadges=showTopicPostBadges}}
    {{#if showThumbnail}}
      {{raw "list/topic-thumbnail" topic=topic thumbnails=thumbnails category=category}}
      {{/if}}

```

But I still end up with a `<tr>` tag being added between them and can’t see where it’s being generated?:

 ![image](https://global.discourse-cdn.com/meta/original/3X/5/d/5dac0f934e488c5f6a4dbc19a2d0e8edde0b33ee.png)

Could this be being added by the javascript in `topic-list-item.js.es6`? Most definitely.

Attempting to overwrite with this in the initialiser:

```plaintext
api.modifyClass('component:topic-list-item', {
  tagName: 'div'
});

```

So I now have this working …

---

_[View the full topic](https://meta.discourse.org/t/is-there-an-event-that-fires-when-topic-lists-are-reloaded/78523)._
