react-native-multiple-image-picker icon indicating copy to clipboard operation
react-native-multiple-image-picker copied to clipboard

following field missing from options type

Open EddStrickland opened this issue 4 years ago • 2 comments

https://github.com/baronha/react-native-multiple-image-picker/blob/389cd75411e45f0b744c8da163fcd6904853af43/example/src/App.js#L12

const response = await MultipleImagePicker.openPicker({ selectedAssets: images, // isExportThumbnail: true, // maxVideo: 1, usedCameraButton: false, singleSelectedMode: true, // isCrop: true, // isCropCircle: true, // selectedColor: '#f9813a', });

  missing fields in type definition:
  isExportThumbnail:
  maxVideo
  isCrop
  isCropCircle:
  
  Need these adding back into the type if this is to work. 
  
  EG:

export type Options = { isPreview?: boolean; selectedColor?: string; selectedAssets?: Results[]; tapHereToChange?: string; cancelTitle?: string; doneTitle?: string; emptyMessage?: string; emptyImage?: Image; usedCameraButton?: boolean; usedPrefetch?: boolean; previewAtForceTouch?: boolean; allowedLivePhotos?: boolean; allowedVideo?: boolean; allowedAlbumCloudShared?: boolean; allowedPhotograph?: boolean; // for camera ?: allow this option when you want to take a photos allowedVideoRecording?: boolean; //for camera ?: allow this option when you want to recording video. maxVideoDuration?: Number; //for camera ?: max video recording duration autoPlay?: boolean; muteAudio?: boolean; preventAutomaticLimitedAccessAlert?: boolean; // newest iOS 14 mediaType?: string; numberOfColumn?: number; maxSelectedAssets?: number; fetchOption?: Object; fetchCollectionOption?: Object; singleSelectedMode?: boolean; maximumMessageTitle?: string; maximumMessage?: string; messageTitleButton?: string; //resize thumbnail thumbnailWidth?: number; thumbnailHeight?: number; haveThumbnail?: boolean;

// Added Fields isExportThumbnail?:Image; maxVideo?: number; isCrop?: boolean; isCropCircle?: boolean;

}

in file https://github.com/baronha/react-native-multiple-image-picker/blob/main/src/index.d.ts

EddStrickland avatar Nov 19 '21 15:11 EddStrickland

It's not official yet. This is only for Android and I'm implementing it on iOS

baronha avatar Nov 22 '21 03:11 baronha

Ah ok then the issue is within JS this works but if you use typescript, then it's not destructuring your core default options with the spread so it's only getting the types as defined in the specific file picker type for multiple images.

...defaultOptions

EddStrickland avatar Nov 22 '21 10:11 EddStrickland

Please check the new version ( The current version is ver.1.0.0 )!

baronha avatar Apr 11 '23 03:04 baronha