How to use the autosize.destroy function in autosize

To help you get started, we’ve selected a few autosize 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 youzan / zent / packages / zent / src / input / Textarea.tsx View on Github external
componentWillUnmount() {
    const { autoSize } = this.props;
    autoSize && autosize.destroy(this.textarea);
  }
github youzan / zent / packages / zent / src / input / TextArea.tsx View on Github external
return () => {
        autosize.destroy(el);
      };
    }, [autoSize, ref]);
github hashicorp / vault / ui / lib / core / addon / components / masked-input.js View on Github external
willDestroyElement() {
    this._super(...arguments);
    autosize.destroy(this.element.querySelector('textarea'));
  },
  displayOnly: false,
github SamDelgado / samson.js / examples / todo-app / app / pages / viewTodos / index.js View on Github external
beforeRemove : function(callback) {

    autosize.destroy(this.element.querySelectorAll("textarea"));

    callback();

  }
github sharetribe / ftw-daily / src / components / ExpandingTextarea / ExpandingTextarea.js View on Github external
componentWillUnmount() {
    autosize.destroy(this.textarea);
    window.clearTimeout(this.timeoutId);
    window.removeEventListener('resize', this.update);
  }
  update() {
github buildkite / frontend / app / components / shared / FormTextarea.js View on Github external
componentWillUnmount() {
    if (this.props.autoresize) {
      autosize.destroy(this._textarea);
    }
  }
github Automattic / wp-calypso / client / components / textarea-autosize / index.jsx View on Github external
componentWillUnmount() {
		autosize.destroy( this.refs.textarea );
	}
github xCss / Valine / index.js View on Github external
let syncContentEvt = (_el) => {
        let _v = 'comment';
        let _val = (_el.value || '');
        _val = Emoji.parse(_val);
        _el.value = _val;
        let ret = xssFilter(marked(_val));
        defaultComment[_v] = ret;
        _vpreview.innerHTML = ret;
        if (_val) autosize(_el);
        else autosize.destroy(_el)
    }

autosize

Autosize is a small, stand-alone script to automatically adjust textarea height to fit text.

MIT
Latest version published 2 years ago

Package Health Score

70 / 100
Full package analysis