gorhom / react-native-bottom-sheet

A performant interactive bottom sheet with fully configurable options 🚀
https://ui.gorhom.dev/components/bottom-sheet
MIT License
6.66k stars 738 forks source link

[Breaking issue in ios]: footer is not working without height in ios with BottomsheetModal #1896

Closed somasekharkakarla closed 1 week ago

somasekharkakarla commented 1 month ago

Bug

In android bottomsheetmodel is working without hight and width. but not in iOS. i need to give height in ios. In previous code i used bottomsheet in that both android and iOS is working fine without height for footer.

Android: Screenshot_20240727-002351

iOS: IMG_0244

Environment info

Library Version
@gorhom/bottom-sheet 4.6.3
react-native 0.73.8
react-native-reanimated 3.14.0
react-native-gesture-handler 2.17.1

Steps To Reproduce

  1. just use a simple bottomsheetmodal with bottomsheet sectionalist
  2. add a footer

Describe what you expected to happen:

  1. it need work as same as bottomsheet

Reproducible sample code

 const renderFooterEnableSelection = useCallback(
    (props: any) => {
      return (
        <BottomSheetFooter {...props} appearanceBehavior={'fade'}>
          <Surface
            elevation={4}
            style={{ backgroundColor: THEME.COLOR.BASE.WHITE }}
          >
            <View
              style={{
                flexDirection: 'row',
                paddingHorizontal: THEME.SIZE[4],
                paddingVertical: THEME.SIZE[5],
              }}
            >
              <View
                style={{
                  flex: 1,
                  marginRight: THEME.SIZE[1],
                }}
              >
                <Button
                  variant={'secondary_md'}
                  title={'Cancel'}
                  fullWidth={true}
                  style={{
                    width: '100%',
                  }}
                  actions={{
                    onPress: () => {
                      bottomSheetRef?.current?.dismiss();
                    },
                  }}
                />
              </View>
              <View
                style={{
                  flex: 1,
                  marginLeft: THEME.SIZE[1],
                }}
              >
                <Button
                  variant={'primary_md'}
                  title={'Apply'}
                  fullWidth={true}
                  style={{
                    width: '100%',
                  }}
                  actions={{
                    onPress: () => {
                      onApply(values);
                    },
                  }}
                />
              </View>
            </View>
          </Surface>
        </BottomSheetFooter>
      );
    },
    [values]
  );
github-actions[bot] commented 1 month ago

@somasekharkakarla: hello! :wave:

This issue is being automatically closed because it does not follow the issue template.

github-actions[bot] commented 2 weeks ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 1 week ago

This issue was closed because it has been stalled for 5 days with no activity.