onSelectImage call backfunction only gives index not object in react hooks
amitshahc opened this issue · 2 comments
amitshahc commented
Expected behaviour: the callback function should access the image object selected
Actual behaviour: using react hooks this.props.item is not valid syntax
Steps to reproduce behaviour: just try to read the image object in onSelectImage call back using react hooks
Operating system: windows 10
Browser and version: firefox developer version latest
Hardware: lenovo laptop i5
jairmilanes commented
It gives the image object as the second argument to onSelectImage
, I've just implemented that and worked fine for me.
benhowell commented
Thanks @layoutzweb