How to use the rc-trigger.prototype function in rc-trigger

To help you get started, we’ve selected a few rc-trigger examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github react-component / calendar / tests / __mocks__ / rc-trigger.js View on Github external
import Portal from 'rc-util/lib/Portal';
import Trigger from 'rc-trigger';

Portal.prototype.render = function () { // eslint-disable-line
  return this.props.children;
};

const render = Trigger.prototype.render;

Trigger.prototype.render = function () { // eslint-disable-line
  const tree = render.call(this);

  if (this.state.popupVisible || this._component) {
    return tree;
  }

  return tree[0];
};

export default Trigger;
github react-component / calendar / tests / __mocks__ / rc-trigger.js View on Github external
import Portal from 'rc-util/lib/Portal';
import Trigger from 'rc-trigger';

Portal.prototype.render = function () { // eslint-disable-line
  return this.props.children;
};

const render = Trigger.prototype.render;

Trigger.prototype.render = function () { // eslint-disable-line
  const tree = render.call(this);

  if (this.state.popupVisible || this._component) {
    return tree;
  }

  return tree[0];
};

export default Trigger;

rc-trigger

base abstract trigger component for react

MIT
Latest version published 2 years ago

Package Health Score

82 / 100
Full package analysis

Popular rc-trigger functions