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

rc-trigger

Package Overview
Dependencies
Maintainers
5
Versions
154
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-trigger - npm Package Compare versions

Comparing version 5.2.13 to 5.2.14

17

es/index.js

@@ -46,3 +46,2 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";

// ensure `getContainer` will be called only once
function Trigger(props) {

@@ -56,3 +55,2 @@ var _this;

_this.triggerRef = /*#__PURE__*/React.createRef();
_this.portalContainer = void 0;
_this.attachId = void 0;

@@ -676,4 +674,2 @@ _this.clickOutsideHandler = void 0;

value: function render() {
var _this3 = this;
var popupVisible = this.state.popupVisible;

@@ -753,16 +749,5 @@ var _this$props11 = this.props,

if (popupVisible || this.popupRef.current || forceRender) {
if (!this.portalContainer) {
// In React.StrictMode component will call render multiple time in first mount.
// When you want to refactor with FC, useRef will also init multiple time and
// point to different useRef instance which will create multiple element
// (This multiple render will not trigger effect so you can not clean up this
// in effect). But this is safe with class component since it always point to same class instance.
this.portalContainer = this.getContainer();
}
portal = /*#__PURE__*/React.createElement(PortalComponent, {
key: "portal",
getContainer: function getContainer() {
return _this3.portalContainer;
},
getContainer: this.getContainer,
didUpdate: this.handlePortalUpdate

@@ -769,0 +754,0 @@ }, this.getComponent());

@@ -76,3 +76,2 @@ "use strict";

// ensure `getContainer` will be called only once
function Trigger(props) {

@@ -85,3 +84,2 @@ var _this;

_this.triggerRef = /*#__PURE__*/React.createRef();
_this.portalContainer = void 0;
_this.attachId = void 0;

@@ -707,4 +705,2 @@ _this.clickOutsideHandler = void 0;

value: function render() {
var _this3 = this;
var popupVisible = this.state.popupVisible;

@@ -784,16 +780,5 @@ var _this$props11 = this.props,

if (popupVisible || this.popupRef.current || forceRender) {
if (!this.portalContainer) {
// In React.StrictMode component will call render multiple time in first mount.
// When you want to refactor with FC, useRef will also init multiple time and
// point to different useRef instance which will create multiple element
// (This multiple render will not trigger effect so you can not clean up this
// in effect). But this is safe with class component since it always point to same class instance.
this.portalContainer = this.getContainer();
}
portal = /*#__PURE__*/React.createElement(PortalComponent, {
key: "portal",
getContainer: function getContainer() {
return _this3.portalContainer;
},
getContainer: this.getContainer,
didUpdate: this.handlePortalUpdate

@@ -800,0 +785,0 @@ }, this.getComponent());

2

package.json
{
"name": "rc-trigger",
"version": "5.2.13",
"version": "5.2.14",
"description": "base abstract trigger component for react",

@@ -5,0 +5,0 @@ "engines": {

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