react-native-image-slider-box
react-native-image-slider-box copied to clipboard
Position
Hi! is it possible to assign a position to the slide? for example if I put position={2}, I have the second image that appears
+1
Hi, at the meantime this feature is not available, but I try to sort it out.
+1
As a temporary solution, you can use the following:
const attachmentsForModal = attachments.map(({ uri }) => uri)
const getAttachmentsForModal = (idx: number): string[] => [ ...attachmentsForModal.slice(idx), ...attachmentsForModal.slice(0, idx) ]
attachments.map(({ uri }, index) => <TouchableOpacity onPress={() => openImagesModal(getAttachmentsForModal(index))}> <Image source={{ uri }} /> </TouchableOpacity>