antv-l7/node_modules/rc-resize-observer
thinkinggis f7e5376b7d fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
..
assets fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
es fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
lib fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
HISTORY.md fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
LICENSE.md fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
README.md fix(fix css): fix css png 2019-11-22 18:04:14 +08:00
package.json fix(fix css): fix css png 2019-11-22 18:04:14 +08:00

README.md

rc-resize-observer

NPM version build status Codecov david deps david devDeps npm download

Resize observer for React.

Live Demo

https://react-component.github.io/resize-observer/

Install

rc-resize-observer

Usage

import ResizeObserver from 'rc-resize-observer';
import { render } from 'react-dom';

render(
  <ResizeObserver
    onResize={() => {
      console.log('resized!');
    }}
  >
    <textarea />
  </ResizeObserver>,
  mountNode,
);

API

Property Type Default Description
disabled boolean false
onResize ({ width, height }) => void - Trigger when child node resized

Development

npm install
npm start

License

rc-resize-observer is released under the MIT license.