mxck / react-native-material-menu

Pure JavaScript material menu component for React Native
MIT License
520 stars 92 forks source link

it's not working according to index. #104

Closed varunSuccessive closed 3 years ago

varunSuccessive commented 3 years ago

i have list of array and I have to open pop Menu according to index but it's always appearing for last index value. So how to specify to appear index wise.

vismayainnow8 commented 3 years ago

yes .. i too found the same issue

UnSensei commented 3 years ago

declare the menu = [] and when you try to show or close, pass the unique id like this.menu[id].show();

wiztensai commented 3 years ago

declare the menu = [] and when you try to show or close, pass the unique id like this.menu[id].show();

no, it cannot. i tried it. i use useRef hook. TypeError: undefined is not an object (evaluating 'refTopRightMenu["2"].current')

mxck commented 3 years ago

Now in version 2.0.0 you do not need to use ref.