react-native-bottom-sheet icon indicating copy to clipboard operation
react-native-bottom-sheet copied to clipboard

It would be great if you provide currentState and/or currentSnapPoint in the bottomsheet ref

Open abappi19 opened this issue 5 months ago • 1 comments

Feature Request

It would be great if you provide currentState and/or currentSnapPoint in the bottomsheet ref

Why it is needed

It will reduce boilerplate code and sometime we get sheet hidden/ expanded because of keyboard event which doesn't let us know what the current state of the sheet is

Possible implementation

just add another value to ref and update whenever get changed

Code sample

if(ref.isExpanded || ref.currentIndex === 2){
    //sheet is expanded. hide it.
    ref.hide();
}

abappi19 avatar Sep 18 '24 10:09 abappi19