prscX / react-native-bottom-action-sheet

React Native: Native Bottom Action Sheet
Apache License 2.0
634 stars 48 forks source link

Multi select option #57

Closed ilibilibom closed 4 years ago

ilibilibom commented 4 years ago

Is there a way to a multiselect option (with checkmarks) to RNbas ? Here is my current code:

<RNBottomActionSheet.SheetView
          visible={true}
          title={'Awesome!'}
          theme={'light'}
          onSelection={(index, value) => {
            // value is optional
            console.log('selection: ' + index + ' ' + value);
          }}>
          <RNBottomActionSheet.SheetView.Item
            title={'Facebook'}
            value="facebook"
            subTitle={'Facebook Description'}
            icon={facebook}
          />
          <RNBottomActionSheet.SheetView.Item
            title={'Instagram'}
            value="Instagram"
            subTitle={'Instagram Description'}
            icon={instagram}
          />
        </RNBottomActionSheet.SheetView>

2 more questions: 1) Why is value undefined in onSelection ? 2) Is there a way to show custom images in sheet view ?

prscX commented 4 years ago

@ilibilibom: Please find below my response:

Thanks </ Pranav >