ui/Placeholder

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
Object

The bounds of the container represented by an object with height and width members. 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
String

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';
Configuration
ArrayBooleanFunctionModuleNumberObjectString