nerp-tech / react-fab

Floating Action Buttons for React
https://github.com/nerp-tech/react-fab-example
MIT License
4 stars 5 forks source link

Close on select #4

Closed aogaili closed 6 years ago

aogaili commented 6 years ago

Is there way to close the action buttons on select?

thanks for the component.

idmontie commented 6 years ago

It looks like I am not passing through the onClick handler that closes the FAB if you override it by passing in your own onClick event handler.

I'll mark this as a bug and get to it when I can.

aogaili commented 6 years ago

Thanks @idmontie , but how do you close it with the onClick handler? What is the desired API to toggle the actions menu?

idmontie commented 6 years ago

I think the default behavior should be to close the FAB when any<FabAction> is clicked. I can also provide an interface that will provide a close function from the <Fab> that can be called when using a ref.

aogaili commented 6 years ago

@idmontie any progress on this?

idmontie commented 6 years ago

Completed in https://github.com/nerp-tech/react-fab/commit/649bbd68f67a1c490835e505484f1e1953c8241e.

I'll version bump and release it soon.

idmontie commented 6 years ago

Released in 1.2.0

aogaili commented 6 years ago

Thanks for implementing this 👍

MRMTC commented 5 years ago

Hi Guys :)

Firstly thanks for the great library :) I was wondering if it was possible to have the FAB button "open" by default? So currently when I click on the FAB button, the respective options are displayed.

Is there a way to have it open by default when the page loads?

Thanks.

idmontie commented 5 years ago

@MRMTC please feel free to open an issue so that we can track this new feature 👍

MRMTC commented 5 years ago

Sure, will do - thanks @idmontie :)