Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4826

A little filtering help needed

$
0
0

@JordanRDesigns wrote:

I'm struggling to figure out the best way to go about this.

I have an items route that has a component rendering an item layout in an each block.

I want to have a route called items/my-bids that shows the same layout of the component rendering in an each block. However, on this route I want to animate items that the user is not currently bidding on away upon entering this route, and then when going back to the items route have them animate back in.

I know I should be able to do these animations all on the my-bids route when the template has rendered and just before it's about to transition away.

The event items that are rendering via the component have a computed property class binding on them to indicate if the logged in user has bid on that item in the past. So I should be able to target those that the user has not bid on (those without the class) and animate those in or out depending on the action taking place (arriving at the my-bids route or leaving it)

One problem with this is I can't seem to get at the event items rendered by the component after the route has finished loading.

I am trying

actions: {
  	didTransition() {
  		Ember.$('.event-item-component:not(.bidding)').addClass('animate');
  	}
  }

However that can't seem to get at the elements, if I console log the elements it's not selecting anything. Is there a different hook I need to listen on to be able to do this?

Maybe there is an easier way to do this?

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4826

Trending Articles