Hosanna UI API v1.30.2-next
    Preparing search index...

    BaseCollectionViewRow manages a single row in a collection view, including its layout, focus, rendering, and scrolling. Handles mounting, animation between items, focus management, and cell status updates. Implements IReusable and IBaseCollectionViewRow interfaces.

    Type Parameters

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    _didEmitItemBlurForAnimation: boolean = false

    One-shot guards for item focus event emissions during a single item animation

    _didEmitItemFocusForAnimation: boolean = false
    _hid: string = ''

    Internal unique identifier for the row.

    baseAnimationDuration: number = 200

    The base animation duration for scrolling.

    calculatedHeight: number = 0

    The calculated height of the row.

    canPeekInto: boolean = false

    Whether the row can peek into the next item.

    canReceiveFocus: boolean = false

    Whether the row can receive focus.

    cellPadding: number = 0

    The padding of the cell.

    cellSettingsKey: string = 'cells.default'

    The style key for the cell.

    cellSize: [number, number] = ...

    The size of the cell.

    clippingRect: [number, number, number, number] = ...

    The clipping rectangle for the row.

    container: ISGNGroup

    The container group node for the row.

    The content data for the row.

    currentSelectedTab: string = ''

    The name of the selected tab the row belongs to.

    direction: number = 0
    fastScrollDuration: number = 100

    The duration for fast scrolling animations.

    floatingFocusAreaWidth: number = 1920

    The width of the floating focus area for this row.

    focusedIndex: number = 0

    The currently focused item index in the row.

    The focus manager for this row.

    focusSettings: ICollectionViewFocusSettings = {}

    The focus settings of the row.

    focusStrategy: CollectionViewRowFocusStrategy = CollectionViewRowFocusStrategy.FocusOnPreviousItem

    The focus strategy for the row.

    focusTarget?: IHosannaView<ViewState>

    The view to receive focus, if any.

    headerHeight: number = 0

    The header height of the row.

    headerSettings: ICollectionViewHeaderSettings = {}

    The header settings of the row.

    horizontalDirectionMultiplier: number = 1

    Cached direction conversion: 1 for LTR and -1 for RTL.

    id: string = ''

    The row's unique identifier.

    index: number = 0

    The index of the row in the collection view.

    initialHeight: undefined | number = undefined

    The initial height of the row.

    isAnimating: boolean = false

    Whether the row is currently animating.

    isFastScroll: boolean = false

    If fast, it will not use easing.

    isFocusable: boolean = true

    Whether the row is focusable.

    isHidden: boolean = false

    Whether the row is visible.

    isNextItemAtTargetPosition: boolean = false

    Whether the next item is on screen.

    isOnScreen: boolean = false

    Whether the row is currently on screen.

    isSticky: boolean = false

    Whether the row is sticky.

    lastRenderedY: number = 0

    The last rendered Y position of the row.

    layout: T

    The layout instance managing cell arrangement for this row.

    loadingCellStyleKey: string = 'cells.default'

    The style key for the loading cell.

    nextItemIndex: number = 0

    The next item index for focus movement.

    numCols: number = 1

    The number of columns in the row.

    overlaysContainer: ISGNGroup

    The container group node for the overlays.

    Reference to the parent collection view.

    parentSectionName: string = ''

    The name of the parent section the row belongs to.

    parentTabGroupName: string = ''

    The name of the parent tab group the row belongs to.

    peekAheadHeight: number = 0

    The height of the peek ahead for the row.

    readingDirection: ReadingDirection = CollectionViewReadingDirection.LeftToRight

    Horizontal reading order resolved from the row override or parent collection view.

    renderedListPosition: number = 0

    The rendered list position of the row.

    rowState: RowState = RowState.None

    The current row state (e.g., None, Loading, Loaded, etc.).

    screenYPosition: number = 0

    The screen Y position of the row.

    sectionHeader: boolean = false

    Whether the row is a section header.

    sectionName: string = ''

    The name of the section the row belongs to.

    selectedIndex: number = -1

    The index of the selected item in the row.

    shouldDispatchHighFidelityItemFocusEvents: boolean = false

    Cached at mount so ordinary rows avoid per-frame callback work.

    showFocusFootprint: boolean = false

    Whether to show the focus footprint for the row.

    showSelectedStyles: boolean = false

    Whether to apply selected styles to the row cells.

    speed: number = 150

    The scroll speed for animations.

    startIndex: number = -1

    The starting index for scrolling/animation.

    tabGroupName: string = ''

    The name of the tab group the row belongs to.

    tabGroupSelector: boolean = false

    Whether the row is a tab group selector.

    targetIndex: number = 0

    The target index for scrolling/animation.

    timeToNextItem: number = 0

    Time to reach the next item during animation.

    timeToTargetItem: number = 0

    Time to reach the target item during animation.

    useMixedCellStyleKeys: boolean = false

    When true, non-loading items may each specify cellSettingsKey so different cells in the same row use different styles (instance-pool keys). When false, BaseCollectionViewRow.cellSettingsKey applies to every cell.

    useMixedFocusSettings: boolean = false

    When true, non-loading items may each specify focusSettings so focused cells in the same row can override row-level focus indicator behavior. When false, row focus settings are used directly.

    viewportWidth: number = 1920

    The width of the viewport for this row.

    xOffset: number = 0

    The content offset of the row.

    Accessors

    • get hasLoadedRemoteData(): boolean

      Whether remote data has been loaded for this row (derived from content.dataSourceState.itemState).

      Returns boolean

    Methods

    • Animates between indexes using time-based interpolation.

      Parameters

      Returns void

    • Parameters

      • OptionalstyleDefinedNumCols: number

      Returns number

    • Gets the boundary item index when moving vertically. Override this function if your row has more than one item per sub-row, and you want to move to the first or last item when moving vertically.

      Parameters

      • direction: number

        1 for up, 1 for down

      Returns number

    • Gets the height for a specific cell index. Supports variable height cells.

      Parameters

      • index: number

      Returns number

    • Gets the width for a specific cell index. Delegates to the layout to support variable width cells.

      Parameters

      • index: number

        The cell index.

      Returns number

      The cell width.

    • Parameters

      • itemIndex: number

      Returns number

    • Returns IHorizontalFocusAnimationStrategy

    • Gets the percent completion of focus movement between items.

      Returns number

      The focus percent (0 to 1).

    • Returns number

    • Gets the next item index based on the focus strategy when moving vertically.

      Parameters

      • direction: number

        1 for up, 1 for down

      Returns number

      The next item index based on the focus strategy.

    • Gets the next item index when moving horizontally within row. Override this function if your row has more than one item per sub-row, and you want to move to the next item when moving horizontally.

      Parameters

      • direction: number

        1 for left, 1 for right

      Returns number

      The index of the next item.

    • Gets the item index under a pointer point in collection-view local coordinates.

      Parameters

      • localX: number
      • localY: number
      • rowTop: number

      Returns number

    • Gets the item index based on the focus strategy when moving vertically.

      Parameters

      • direction: number

        1 for up, 1 for down

      Returns number

      The item index based on the focus strategy.

    • Gets the time required to move to the next item.

      Returns number

      The time in milliseconds.

    • Gets the total time required to move to the target item.

      Returns number

      The time in milliseconds.

    • Jumps to the specified item index without animation.

      Parameters

      • index: number

        The target item index.

      Returns void

    • Called when the row enters the screen. Prepares layout and marks as visible.

      Returns void

    • Called when the row exits the screen. Cleans up layout and marks as not visible.

      Returns void

    • Called before the row is released back to the pool. Cleans up layout and resets content and parent references.

      Returns void

    • Called before the row is reused from the pool. Resets layout state, animation state, and layout-related properties so reused rows do not retain stale values from their previous content. configure() uses ?? this.oldValue for many properties; resetting these ensures we use class defaults when content.settings omits them.

      Returns void

    • Animates the row to the specified item index.

      Parameters

      • index: number

        The target item index.

      • fast: boolean

      Returns void

    • Returns void

    • Renders the row and its cells based on the render event. Handles forced renders and animation between indexes.

      Parameters

      Returns void

    • Parameters

      • focusAnimationStrategy: IHorizontalFocusAnimationStrategy

      Returns void

    • Updates the view status of cells when focus changes.

      Parameters

      • prevIndex: number

        The previously focused index.

      • newIndex: number

        The newly focused index.

      Returns void

    • Updates internal fields for focus tracking after reaching a new item.

      Returns void

    • Updates layout constants, such as height, based on content or layout properties.

      Returns void