Skip to content

Prevent default behaviour of opening menu when pressed? #189

Open
@follower

Description

@follower

I wanted to prevent the default behaviour of opening the menu when onPress is triggered (when child items are present) but it seems the code does not allow for this functionality:

          onPress={() => {
            this.props.onPress()
            if (this.props.children) this.animateButton()
          }}>

My goal was to have a short press activate one action but have a long press open the menu.

One approach to implement this could be to allow onPress to return true to prevent the default action.

I realise this functionality isn't how the FAB is supposed to work, so, from that point of it's reasonable not to support it but I thought I'd at least mention it. :)

Thanks for your work on the project!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions