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, setStateContainer
acceptTriggerEvent, 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, viewportChanged
protected com.facebook.litho.sections.common.HideableDataDiffSection.HideableDataDiffSectionStateContainer createStateContainer()
createStateContainer
in class Section
public boolean isEquivalentProps(Section other, boolean shouldCompareCommonProps)
isEquivalentProps
in class Section
public HideableDataDiffSection makeShallowCopy(boolean deepCopy)
makeShallowCopy
in class Section
Section
. 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)
SectionLifecycle
transferState
in class SectionLifecycle
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)
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 SectionLifecycle
protected void createInitialState(SectionContext c)
createInitialState
in class SectionLifecycle
protected Children createChildren(SectionContext c)
SectionLifecycle
GroupSectionSpec
method annotated with OnCreateChildren
createChildren
in class SectionLifecycle