ui/ Placeholder
Exports the ui/Placeholder.contextTypes object and the ui/Placeholder.PlaceholderControllerDecorator and ui/Placeholder.PlaceholderDecorator higher-order components.
The default export is ui/Placeholder.PlaceholderDecorator.
import Placeholder from '@enact/ui/Placeholder';Members
PlaceholderControllerDecoratorHigher-Order Component
ui/Placeholder.PlaceholderControllerDecorator is a Higher-order Component that can make
placeholders rendered or not rendered depending on 'scrollTop' from the 'onScroll''s parameter.
import {PlaceholderControllerDecorator} from '@enact/ui/Placeholder';Configuration
- bounds
The bounds of the container represented by an object with
heightandwidthmembers. If the container is a static size, this can be specified at design-time to avoid calculating the bounds at run-time (the default behavior).Default: null- notify
Event callback which indicates that the viewport has scrolled and placeholders should be notified.
Default: onScroll
PlaceholderDecoratorHigher-Order Component
ui/Placeholder.PlaceholderDecorator is a Higher-order Component that can be used that a container notify the Wrapped component when scrolling.
Containers must provide registerPlaceholder, unregisterPlaceholder, and invalidateBounds methods via React's context for
PlaceholderDecorator instances.
import {PlaceholderDecorator} from '@enact/ui/Placeholder';