Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

style width menu of react-native-paper

I have a menu with a anchor to a button.

I would like to style width of menu such as button.

I have try with style=width:100% but doesn't works. If I change the dimension in pixel, it change.

How I can style with flex mode (for dynamic width).

This is an example: https://snack.expo.io/@temuccio/menu

like image 421
Francesco Avatar asked Sep 13 '25 10:09

Francesco


1 Answers

Found a solution: use List.Item instead of Menu.Item

I tried solution mentioned in https://github.com/callstack/react-native-paper/issues/2314#issuecomment-716496115

but some how even if the width of Menu.Item becomes 100% ,some part of Menu.Item at right becomes not clickable
so only solution that worked for me was to replace Menu.Item with List.Item

This is an example:https://snack.expo.io/@gautami123/menu

like image 152
Gautami Dhokte Avatar answered Sep 16 '25 17:09

Gautami Dhokte