Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rikimaru09-react-image-picker

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rikimaru09-react-image-picker - npm Package Compare versions

Comparing version 1.1.7 to 1.1.8

2

package.json
{
"name": "rikimaru09-react-image-picker",
"version": "1.1.7",
"version": "1.1.8",
"description": "Picks images from gallery",

@@ -5,0 +5,0 @@ "main": "dist/app.js",

@@ -18,3 +18,4 @@ import React, { Component } from 'react'

image: null,
images: []
images: [],
picked: Map().set(0, '0e1abaf656c3367fc89f628f0d52ad11.jpg')
}

@@ -24,3 +25,4 @@ }

onPickImage(image) {
this.setState({image})
const picked = Map().set(image.value, image.src);
this.setState({image, picked})
}

@@ -32,2 +34,7 @@

onChangePicked() {
const picked = Map().set(2, '6c800cccebf18c24f51d5fd411818ac8.jpg');
this.setState({picked});
}
render() {

@@ -38,6 +45,7 @@ return (

<h3>Single Select</h3>
<button onClick={this.onChangePicked.bind(this)}>Test</button>
<ImagePicker
images={imageList.map((image, i) => ({src: image, value: i}))}
onPick={this.onPickImage.bind(this)}
picked={Map().set(0, '0e1abaf656c3367fc89f628f0d52ad11.jpg')}
picked={this.state.picked}
/>

@@ -44,0 +52,0 @@ <textarea rows="4" cols="100" value={this.state.image && JSON.stringify(this.state.image)} disabled/>

@@ -19,5 +19,3 @@ import React, { Component } from 'react';

componentWillReceiveProps(nextProps) {
if(this.props.picked.get(0) !== nextProps.picked.get(0)) {
this.setState({picked: nextProps.picked});
}
this.setState({picked: nextProps.picked});
}

@@ -24,0 +22,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc