Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The auxiliary element does not animate away when dismissing the context menu by pressing the preview element. #92

Open
GaddiSunshine opened this issue Jan 25, 2024 · 0 comments

Comments

@GaddiSunshine
Copy link

GaddiSunshine commented Jan 25, 2024

Pressing the preview element causes auxiliary element to not animate away. It just waits for the context menu to close and then snaps away

Screen.Recording.2024-01-25.at.14.43.24.mov

Expected behaviour:
The auxiliary element would animate away like it does when pressing outside the preview element.

Actual behaviour:
The auxiliary element does not animate away when dismissing the context menu by pressing the preview element.

Platform:

  • iOS debug configuration build
  • iOS release configuration build

Versions:

"react-native": "0.72.6",
"expo": "49.0.18",
"react-native-ios-context-menu": "2.3.0",
"react-native-ios-utilities": "4.2.3",

Minimal reproducible example:

import React from 'react'
import { StyleSheet, View } from 'react-native'
import { ContextMenuView } from 'react-native-ios-context-menu'

const ContextMenuTest = () => (
  <View style={styles.root}>
    <ContextMenuView
      menuConfig={{
        menuTitle: '',
        menuItems: [
          {
            actionKey: 'cancel',
            actionTitle: 'Cancel',
          },
        ],
      }}
      renderAuxiliaryPreview={() => <View style={styles.auxiliaryElement} />}
    >
      <View style={styles.box} />
    </ContextMenuView>
  </View>
)

const styles = StyleSheet.create({
  root: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
  },
  box: {
    height: 50,
    width: 50,
    backgroundColor: 'blue',
  },
  auxiliaryElement: {
    backgroundColor: 'green',
    height: 50,
    width: 200,
  },
})

export default ContextMenuTest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant