- Upgraded to contain-by-screen 2.1.0 to fix issues with large menus not being fit on screen.
- Added support for passing an HTMLElement as the
anchor
prop.
- The choice return value from contain-by-screen is now available if you pass a callback as the
float
prop.
- Added the
parentElement
prop.
- Added the
repositionAsync()
method to FloatAnchor. This method should generally be used instead ofreposition()
because it allows multiple queued repositions to be coalesced together. - Fixed multiple O(n^2) issues with nested FloatAnchors that caused them to be repositioned redundantly when the outer FloatAnchors were repositioned.
- Fixed
autoFocus
prop not working on input elements and similar components inside of a floated element. The float element container div is now added to the page body before any of the float elements' componentDidMount methods are called.
- React v16.6.0+ is now required.
- The
anchor
prop must be a function of anchorRef => React node now.
FloatAnchor v2:
<FloatAnchor
anchor={
<div>a</div>
}
/>
FloatAnchor v3:
<FloatAnchor
anchor={anchorRef =>
<div ref={anchorRef}>a</div>
}
/>
- Removed all usages of the deprecated method React.findDOMNode.
- No longer uses the legacy Context API.
- Both
anchor
andfloat
props may now use any React node rather than only a React element. (You can pass a string now.)
- Fixed compatibility with Flow v0.84.
- Added TypeScript type definitions.
- Removed use of deprecated React method
componentWillReceiveProps
.
- Added floatContainerClassName prop #3
- React v16 is now required.
- FloatAnchor.portal property was removed.
- Fixed compatibility with Flow v0.80.
- Fixed compatibility with Flow v0.53.
- Stopped publishing tests to npm.
- Fixed IE compatibility #2
- Fixed a few missed deprecated React.PropTypes usages.
- Use new prop-types package and stopped using deprecated React.PropTypes.
- Fixed compatibility with Flow v0.41.
- Fixed compatibility with Flow v0.38.
- Fixed an error when importing FloatAnchor in non-browser environments (such as tests).
- Fixed compatibility with Flow v0.32.
- Fixed issue with FloatAnchor.parentNodes when called after anchor element changed.
- (Flow) Re-export the Options type from contain-by-screen to be used by consumers.
- Fixed compatibility with Flow v0.30.
- Added FloatAnchor.parentNodes function.
- Use passive scroll events to allow browser optimizations.
- Added portal property to component instance.
- Added zIndex prop.
- Changed peerDependencies to mark compatibility with React 15.
Initial stable release.