mxck / react-native-material-menu

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

Style property 'width' is not supported by native animated module #88

Closed anmolguptachicmic closed 4 years ago

anmolguptachicmic commented 4 years ago

Issue Description When I click on the menu button it gives me an error Style property 'width' is not supported by native animated module This was working fine in 1.0.0 but it is broken in version 1.1.1

Expected Results Should show the menu on click

Additional Information React Native version:0.61 Platform(s) (iOS, Android, or both?):both Operating System (macOS, Linux, or Windows?): macOS

Steps to Reproduce / Code Snippets

 <Menu
          ref={this.setMenuRef}
          button={<Text onPress={this.showMenu}>Show menu</Text>}
>
          <MenuItem onPress={this.hideMenu}>Edit Comment</MenuItem>
          <MenuItem onPress={this.hideMenu}>Delete Comment</MenuItem>
</Menu>

Simulator Screen Shot - iPhone 8 - 2020-04-02 at 15 58 31

joshuadiezmo commented 4 years ago

any fixed for this?

joshuadiezmo commented 4 years ago

The problem is they add useNativeDriver: true, on Menu.js file

@anmolguptachicmic you can just comment this lines

https://github.com/mxck/react-native-material-menu/commit/4e4e7673ac96882a46eeba841f56d547ef07fcaf#diff-e359c93bc52c848fbef7e3bdc25527dbR68

https://github.com/mxck/react-native-material-menu/commit/4e4e7673ac96882a46eeba841f56d547ef07fcaf#diff-e359c93bc52c848fbef7e3bdc25527dbR74

https://github.com/mxck/react-native-material-menu/commit/4e4e7673ac96882a46eeba841f56d547ef07fcaf#diff-e359c93bc52c848fbef7e3bdc25527dbR104

anmolguptachicmic commented 4 years ago

The problem is they add useNativeDriver: true, on Menu.js file

@anmolguptachicmic you can just comment this lines

4e4e767#diff-e359c93bc52c848fbef7e3bdc25527dbR68

4e4e767#diff-e359c93bc52c848fbef7e3bdc25527dbR74

4e4e767#diff-e359c93bc52c848fbef7e3bdc25527dbR104

Thanks, @joshuadiezmo this worked for me.

mxck commented 4 years ago

Fixed in 1.1.2! Sorry for 1.1.1, I revoke this version from npm.