ui/ Resizable
A higher-order component that handles component resize event.
import Resizable from '@enact/ui/Resizable';
Members
ResizableHigher-Order Component
A higher-order component that notifies a container that the wrapped component has been resized.
It may be useful in cases where a component may need to update itself as a result of its children changing in size, such as a Scroller.
Containers must provide an invalidateBounds
method via React's context in order for Resizable
instances to notify it of resize.
The wrapped component must respond to the configured resize event.
import Resizable from '@enact/ui/Resizable';
Configuration
A handler to process the
resize
event.It should return a truthy value if the event should trigger a resize.
See: core/handleDefault: nullThe name of the event on the wrapped component to listen to for size changes.
This event name will be passed to the wrapped component and will also be forwarded (if needed) to the parent component.