React-native-paper: Menu and Dropdown

Created on 19 Oct 2016  路  7Comments  路  Source: callstack/react-native-paper

medium priority

Most helpful comment

If you're on Android, you can currently use the undocumented popup menu in React Native:

UIManager.showPopupMenu(
  ReactNative.findNodeHandle(
    this._anchor // Ref to the item that'll act as anchor to the popup menu
  ),
  ['One', 'Two', 'Three'],
  error => { /* handle error */ },
  (
    action, // "itemSelected", "dismissed"
    index // index of item that's selected
  ) => { /* handle action /* },
);

I've an open PR for a nicer component API, but it's not merged yet:https://github.com/facebook/react-native/pull/14581

Our PopupMenu implementation should also have the same API.

All 7 comments

Is anything happening with this component? I love this component library, but without the drop down menu to use with the "More" icon in a Toolbar, it seems slightly gimped. What are people doing to display a "more menu" from the Toolbar?

@marktkimball @kpsroka is currently working on that component, so it should be released in the near future.

If you're on Android, you can currently use the undocumented popup menu in React Native:

UIManager.showPopupMenu(
  ReactNative.findNodeHandle(
    this._anchor // Ref to the item that'll act as anchor to the popup menu
  ),
  ['One', 'Two', 'Three'],
  error => { /* handle error */ },
  (
    action, // "itemSelected", "dismissed"
    index // index of item that's selected
  ) => { /* handle action /* },
);

I've an open PR for a nicer component API, but it's not merged yet:https://github.com/facebook/react-native/pull/14581

Our PopupMenu implementation should also have the same API.

Any progress on this component?

@marsonmao not yet.

This project is a reference for this

It's being implemented in #485

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ferrannp picture ferrannp  路  4Comments

yaronlevi picture yaronlevi  路  3Comments

makhataibar picture makhataibar  路  4Comments

alikazemkhanloo picture alikazemkhanloo  路  4Comments

knobandre picture knobandre  路  4Comments