nandorojo / zeego

Menus for React (Native) done right.
https://zeego.dev
MIT License
1.42k stars 41 forks source link

collapse #54

Closed TomWq closed 9 months ago

TomWq commented 10 months ago

I consulted you to provide the example code, and when it crashed on ios, I used expo 49 Exception thrown while executing UI block: *** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[1]

nandorojo commented 10 months ago

i have no idea how to help with this issue. please provide more context or i will have to close

Karthik-B-06 commented 5 months ago

Hey @nandorojo, This error is thrown when using the Context.Menu and while pressing outside the Preview or the Context.Item Shared a screen recording of the same.

https://github.com/nandorojo/zeego/assets/35562287/9dc75d5a-71c2-4711-92d0-0c9ba73128f9

And this only happens when trying to have a custom preview.

      <ContextMenu.Content>
        <ContextMenu.Preview
          // optional props:
          preferredCommitStyle="pop" // or "dismiss"
          backgroundColor={{
            // or a color string directly
            dynamic: {
              dark: "black",
              light: "white",
            },
          }}
        >
          {() => <Animated.Text>{messageItem.content}</Animated.Text>}
        </ContextMenu.Preview>
        <ContextMenu.Item key={"Copy text"}>
          <ContextMenu.ItemTitle>Cool</ContextMenu.ItemTitle>
        </ContextMenu.Item>

      </ContextMenu.Content>
nandorojo commented 5 months ago

Are you using FlashList from Shopify?

Karthik-B-06 commented 5 months ago

Are you using FlashList from Shopify?

Yes. I am.

nandorojo commented 5 months ago

In my experience this can result in some bugs with zeego and the preview/aux views. You might need to use the upstream iOS library on iOS with flashlist. They’re doing a lot of magic with the list and it might result in an issue.

Karthik-B-06 commented 5 months ago

Ohh, Alright. Thanks, Let me see! 😿