Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[List] add a onItemTouchTap property? #4650

Closed
oallouch opened this issue Jul 8, 2016 · 6 comments
Closed

[List] add a onItemTouchTap property? #4650

oallouch opened this issue Jul 8, 2016 · 6 comments
Labels
component: list This is the name of the generic UI component, not the React module!

Comments

@oallouch
Copy link

oallouch commented Jul 8, 2016

Hi,
I'd like to keep the same event listener for each ListItem, so it would be great to be able to get the ListItem from the TouchTap event.
The doc says "touchstart event targeting the ListItem". I don't really know what that means.
What would be nice, is an onItemTouchTap, like the one we got for MenuItem.

Thx in advance,

Olivier Allouch
www.illicotravel.com

@oallouch
Copy link
Author

I'm still curious about this "touchstart event targeting the ListItem" mention. :)

@oallouch
Copy link
Author

And I'd also like to get the item from a rightIconButton tap.

@oallouch
Copy link
Author

Ok, now I tried to use an "old" function (not an arrow) and look what "this" is.
Unfortunately, it's not the ListItem, but the EnhancedButton .

@mpontikes mpontikes mentioned this issue Aug 5, 2016
13 tasks
@oliviertassinari
Copy link
Member

oliviertassinari commented Feb 12, 2017

What would be nice, is an onItemTouchTap, like the one we got for MenuItem.

The current implementation of onItemTouchTap makes us cloning each children. That's terrible for long list performance and prevent us from doing virtualization.
I think that we should be using event delegation instead.

it would be great to be able to get the ListItem from the TouchTap event.

You should be able to use event delegation to get the item index.

@oliviertassinari oliviertassinari added the component: list This is the name of the generic UI component, not the React module! label Feb 12, 2017
@oliviertassinari oliviertassinari changed the title ListItem from event [List] add a onItemTouchTap property? Feb 12, 2017
@oallouch
Copy link
Author

Seems like this perf thing is French :)
Saw your talk at venteprivee. Nice one.

@oliviertassinari
Copy link
Member

oliviertassinari commented Jul 28, 2017

@oallouch Thanks, so let's close the issue and use the native event bubbling instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: list This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests

2 participants