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

How to pass additional index argument to SortableElement? #50

Closed
stenbln opened this issue Feb 6, 2017 · 1 comment
Closed

How to pass additional index argument to SortableElement? #50

stenbln opened this issue Feb 6, 2017 · 1 comment

Comments

@stenbln
Copy link

stenbln commented Feb 6, 2017

Is it possible to pass index argument to SortableElement component.

For example:

change this
const SortableItem = SortableElement(({value}) => <div textValue={value}></div>);

to this
const SortableItem = SortableElement(({value,index}) => <div index={index} textValue={value}></div>);

I am unsure what do I need to modify?

@stenbln
Copy link
Author

stenbln commented Feb 6, 2017

Actually found a solution. index in the SortableElement.js prop is omitted so just using other prop name solves the problem.

@stenbln stenbln closed this as completed Feb 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant