WorkingRangeContainer

A container that stores working range related information. It provides two major methods: a register method to store a working range with a component, and a dispatch method that dispatches event to components to trigger their delegated methods.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion
Link copied to clipboard
@VisibleForTesting(otherwise = 3)
class RangeTuple(val name: String, val workingRange: WorkingRange, scopedComponentInfo: ScopedComponentInfo, val interStagePropsContainer: InterStagePropsContainer?)

A tuple that stores working range information for a list of components that share same name and working range object.

Link copied to clipboard
class Registration(val name: String, val workingRange: WorkingRange, val scopedComponentInfo: ScopedComponentInfo)

A tuple that stores raw data of a working range registration.

Functions

Link copied to clipboard
fun checkWorkingRangeAndDispatch(position: Int, firstVisibleIndex: Int, lastVisibleIndex: Int, firstFullyVisibleIndex: Int, lastFullyVisibleIndex: Int, statusHandler: WorkingRangeStatusHandler)

Iterate the map to check if a component is entered or exited the range, and dispatch event to the component to trigger its delegate method.

Link copied to clipboard

Dispatch onExitRange if the status of the component is in the range. This method should only be called when releasing a ComponentTree, thus no status update needed.

Link copied to clipboard
fun registerWorkingRange(name: String, workingRange: WorkingRange, scopedComponentInfo: ScopedComponentInfo, interStageProps: InterStagePropsContainer?)