Socket
Socket
Sign inDemoInstall

@s-ui/react-atom-image

Package Overview
Dependencies
5
Maintainers
3
Versions
26
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.7.0 to 1.8.0

10

CHANGELOG.md

@@ -5,2 +5,12 @@ # Change Log

<a name="1.8.0"></a>
# 1.8.0 (2018-12-12)
### Features
* add ref to img to ensure image complete loaded in SSR ([76702a8](https://github.com/SUI-Components/sui-components/commit/76702a8))
<a name="1.7.0"></a>

@@ -7,0 +17,0 @@ # 1.7.0 (2018-10-03)

13

lib/index.js

@@ -93,3 +93,3 @@ 'use strict';

error: false
}, _this.handleLoad = function () {
}, _this.imageRef = _react2.default.createRef(), _this.handleLoad = function () {
var onLoad = _this.props.onLoad;

@@ -111,2 +111,10 @@

(0, _createClass3.default)(AtomImage, [{
key: 'componentDidMount',
value: function componentDidMount() {
var img = this.imageRef.current;
if (img && img.complete && this.state.loading) {
this.handleLoad();
}
}
}, {
key: 'render',

@@ -145,3 +153,4 @@ value: function render() {

onLoad: this.handleLoad,
onError: this.handleError
onError: this.handleError,
ref: this.imageRef
}, imgProps))

@@ -148,0 +157,0 @@ ),

2

package.json
{
"name": "@s-ui/react-atom-image",
"version": "1.7.0",
"version": "1.8.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc