Giter Club home page Giter Club logo

Comments (10)

dimaportenko avatar dimaportenko commented on September 23, 2024 2

I did some debug with coloring views and I found out that the menu item height is incorrect. It has green color on the screenshot

So I added height explicitly to the menuItem styles and it solves my issue.

--- a/node_modules/react-native-hold-menu/src/components/menu/MenuItem.tsx
+++ b/node_modules/react-native-hold-menu/src/components/menu/MenuItem.tsx
@@ -13,6 +13,7 @@ import { BORDER_LIGHT_COLOR, BORDER_DARK_COLOR } from './constants';
 import isEqual from 'lodash.isequal';
 import { getColor } from './calculations';
 import { AnimatedIcon } from '../provider/Provider';
+import {MenuItemHeight} from '../../utils/calculations';
 
 const ItemComponent = IS_IOS ? TouchableOpacity : GHTouchableOpacity;
 // @ts-ignore
@@ -33,6 +34,7 @@ const MenuItemComponent = ({ item, isLast }: MenuItemComponentProps) => {
     return {
       borderBottomColor,
       borderBottomWidth: isLast ? 0 : 1,
+      height: MenuItemHeight(),
     };
   }, [theme, isLast, item]);

CleanShot 2022-06-06 at 13 36 30@2x

from react-native-hold-menu.

dimaportenko avatar dimaportenko commented on September 23, 2024 1

@dimaportenko with fix I shared above, I don't see any issues on my side so far.

from react-native-hold-menu.

fukemy avatar fukemy commented on September 23, 2024 1

hi @dimaportenko , did u ever try with adding customview like this?
165982759-5a5d6eb2-592c-4568-88c0-719d23012d6b

from react-native-hold-menu.

Pyroboomka avatar Pyroboomka commented on September 23, 2024

Thanks for the tip, it happens to us sometimes too.
Sometimes it's wrong menu item height, sometimes menu shows not alongside the item tapped but with some offset so it's partially visible. Sometimes the UI elements below the holdable item are not pressable (some portal/overlays don't get unmounted?)
I did some coloring too, but didn't spent much time and had no success debugging this.
Have you encountered same issues by chance?

from react-native-hold-menu.

dimaportenko avatar dimaportenko commented on September 23, 2024

@enesozturk if you fine to add menu height. I can prepare PR.

from react-native-hold-menu.

enesozturk avatar enesozturk commented on September 23, 2024

Hi @dimaportenko, sorry I couldn't spend time on this for a while that is why couldn't try. Glad to hear you solved it, highly appreciate it if you can open a PR. Thanks!

from react-native-hold-menu.

dimaportenko avatar dimaportenko commented on September 23, 2024

@enesozturk np, same for me I haven't time to prepare pr yet. But it is still somewhere on my list.

from react-native-hold-menu.

dimaportenko avatar dimaportenko commented on September 23, 2024

@fukemy nope, I haven't tried anything like this. Tbh I've just started to use the library with the simple case you can see in my first post on this issue. But I think I'll try more later on.

from react-native-hold-menu.

fukemy avatar fukemy commented on September 23, 2024

tks, even in native i didnt see any app can apply it's inside their app, but Message and Telegram did it with very nice ui, i will waiting for your update

from react-native-hold-menu.

fukemy avatar fukemy commented on September 23, 2024

Screen Shot 2022-06-17 at 11 23 59
hi bro @enesozturk , i just found stream chat done it, they using TypeScript + Reanimated2 only and didnt use context menu api from Apple

from react-native-hold-menu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.