OnEnteredRange
Annotated function in the component will allow it be called when entering a working range. To enable the working range, you also have to register it in@OnRegisterRanges method.
For example
@LayoutSpec
public class ComponentSpec {
@OnEnteredRange(name = "prefetch")
static void yourEnterWorkingRangeMethod(ComponentContext c,@Prop YourObject obj) {
}
@OnRegisterRanges
static void yourRegisterMethod(
ComponentContext c,@Prop WorkingRange yourWorkingRange) {
Component.registerPrefetchWorkingRange(c, yourWorkingRange);
}
}
Content copied to clipboard