flight.js event propagation

58 views
Skip to first unread message

Jorge Sanchez

unread,
Feb 26, 2015, 12:00:12 PM2/26/15
to twitter...@googlegroups.com
Hello,

I am not sure if I am doing something wrong but I have following situation.

* with_endless mixin which implements the endless scrolling (either triggered on scroll or on click). 
  The mixin retrieves the data from backend and triggers event with the data:
    this.trigger((this.$node), 'dataEndlessAvailable', fragment);

Both of the below components have with_endless mixin applied
* UiTimeline component - which takes care of the posts in the timeline (prepending, appending, deleting etc) 
* UiPost component - handles the post itself and is attached from within the UiTimeline (used withchild)

Both of the components "listen" on the dataEndlessAvailable event:
this.on('dataEndlessAvailable', this.uiHandleEndless);

The problem is when the dataEndlessAvailble is triggered both uiTimeline and uiPost receive the event. 


Thanks for your help. 

Regards,

Jorge Sanchez

Jorge Sanchez

unread,
Feb 26, 2015, 12:19:57 PM2/26/15
to twitter...@googlegroups.com
Still using 1.3 version:

{
  "name": "flight",
  "description": "Clientside component infrastructure",
  "main": "index.js",
  "version": "1.3.0",
  "ignore": [
    ".*",
    "doc",
    "test",
    "CHANGELOG.md",
    "CONTRIBUTING.md",
    "Makefile",
    "karma.conf.js",
    "package.json",
    "webpack.conf.js"
  ],
  "dependencies": {
    "jquery": ">=1.8.0"
  }
}


Jorge

Dne čtvrtek 26. února 2015 11:00:12 UTC-6 Jorge Sanchez napsal(a):

Jorge Sanchez

unread,
Feb 26, 2015, 2:02:08 PM2/26/15
to twitter...@googlegroups.com
That was my issue. Sorry for not looking into this more deeply before posting it here. 

Jorge

Dne čtvrtek 26. února 2015 11:19:57 UTC-6 Jorge Sanchez napsal(a):
Reply all
Reply to author
Forward
0 new messages