public final class HideableDataDiffSection<T> extends Section
HideableDataDiffSectionSpec that wraps a DataDiffSectionSpec. It provides the
ability to remove an item from the DataDiffSection via the HideItemEvent. This Section emits the following events:
RenderWithHideItemHandlerEvent whenever it needs a Component to render a model
T from the list of data. A HideItemEvent handler is a param of this event. Providing an
handler for this OnEvent is mandatory.
GetUniqueIdentifierEvent is fired when a single unique identifier is needed for a
model object.
| Modifier and Type | Class and Description |
|---|---|
static class |
HideableDataDiffSection.Builder<T> |
| Modifier and Type | Method and Description |
|---|---|
static <T> HideableDataDiffSection.Builder<T> |
create(SectionContext context) |
protected Children |
createChildren(SectionContext c)
This methods will delegate to the
GroupSectionSpec method annotated with OnCreateChildren |
protected void |
createInitialState(SectionContext c) |
protected com.facebook.litho.sections.common.HideableDataDiffSection.HideableDataDiffSectionStateContainer |
createStateContainer() |
protected java.lang.Object |
dispatchOnEventImpl(EventHandler eventHandler,
java.lang.Object eventState) |
static EventHandler<GetUniqueIdentifierEvent> |
getGetUniqueIdentifierEventHandler(SectionContext context) |
static EventHandler<RenderWithHideItemHandlerEvent> |
getRenderWithHideItemHandlerEventHandler(SectionContext context) |
boolean |
isEquivalentProps(Section other,
boolean shouldCompareCommonProps) |
HideableDataDiffSection |
makeShallowCopy(boolean deepCopy) |
protected static void |
onBlacklistUpdate(SectionContext c,
java.lang.Object modelObject,
EventHandler<GetUniqueIdentifierEvent> getUniqueIdentifierHandlerParam) |
protected static void |
onBlacklistUpdateAsync(SectionContext c,
java.lang.Object modelObject,
EventHandler<GetUniqueIdentifierEvent> getUniqueIdentifierHandlerParam) |
protected static void |
onBlacklistUpdateSync(SectionContext c,
java.lang.Object modelObject,
EventHandler<GetUniqueIdentifierEvent> getUniqueIdentifierHandlerParam) |
static EventHandler<HideItemEvent> |
onHideItem(SectionContext c) |
static <T> EventHandler<RenderEvent<T>> |
onRenderEvent(SectionContext c) |
protected void |
transferState(StateContainer _prevStateContainer,
StateContainer _nextStateContainer)
|
generateUniqueGlobalKeyForChild, getChildren, getEventDispatcher, getGlobalKey, getLogTag, getParent, getScopedContext, getSimpleName, getStateContainer, getStateContainer, isEquivalentTo, makeShallowCopy, recordEventTrigger, setChildren, setCount, setGlobalKey, setKey, setScopedContext, setStateContaineracceptTriggerEvent, acceptTriggerEventImpl, bindService, createService, dataBound, dataRendered, dispatchLoadingEvent, dispatchOnEvent, generateChangeSet, getEventTrigger, getEventTrigger, getLoadingEventHandler, getService, getTreePropsForChildren, isDiffSectionSpec, isSectionIndexValid, newEventHandler, newEventTrigger, newEventTrigger, populateTreeProps, refresh, requestFocus, requestFocus, requestFocus, requestFocusWithOffset, requestFocusWithOffset, requestFocusWithOffset, requestSmoothFocus, requestSmoothFocus, requestSmoothFocus, shouldUpdate, transferService, unbindService, verifyChangeSet, viewportChangedprotected com.facebook.litho.sections.common.HideableDataDiffSection.HideableDataDiffSectionStateContainer createStateContainer()
createStateContainer in class Sectionpublic boolean isEquivalentProps(Section other, boolean shouldCompareCommonProps)
isEquivalentProps in class Sectionpublic HideableDataDiffSection makeShallowCopy(boolean deepCopy)
makeShallowCopy in class SectionSection. if deepCopy is false the clone won't contain any
children or count as it will be returned in a pre - ChangeSet generation state.public static <T> HideableDataDiffSection.Builder<T> create(SectionContext context)
protected void transferState(StateContainer _prevStateContainer, StateContainer _nextStateContainer)
SectionLifecycletransferState in class SectionLifecycleprotected static void onBlacklistUpdate(SectionContext c, java.lang.Object modelObject, EventHandler<GetUniqueIdentifierEvent> getUniqueIdentifierHandlerParam)
protected static void onBlacklistUpdateAsync(SectionContext c, java.lang.Object modelObject, EventHandler<GetUniqueIdentifierEvent> getUniqueIdentifierHandlerParam)
protected static void onBlacklistUpdateSync(SectionContext c, java.lang.Object modelObject, EventHandler<GetUniqueIdentifierEvent> getUniqueIdentifierHandlerParam)
public static EventHandler<RenderWithHideItemHandlerEvent> getRenderWithHideItemHandlerEventHandler(SectionContext context)
public static EventHandler<GetUniqueIdentifierEvent> getGetUniqueIdentifierEventHandler(SectionContext context)
public static <T> EventHandler<RenderEvent<T>> onRenderEvent(SectionContext c)
public static EventHandler<HideItemEvent> onHideItem(SectionContext c)
protected java.lang.Object dispatchOnEventImpl(EventHandler eventHandler, java.lang.Object eventState)
dispatchOnEventImpl in class SectionLifecycleprotected void createInitialState(SectionContext c)
createInitialState in class SectionLifecycleprotected Children createChildren(SectionContext c)
SectionLifecycleGroupSectionSpec method annotated with OnCreateChildrencreateChildren in class SectionLifecycle