Skip to content

Artboard List Map Rules are global by ViewModel ID, not scoped per List instance #415

@noskovvkirill

Description

@noskovvkirill

Description

I have a Rive file with a main artboard containing multiple nested artboards. Each nested artboard has a List component bound to the same ViewModel type ("Slide"), but each List should map to a different component artboard ("Entry" vs "Summary-Entry"). My goal is to have a configurable presentation for the same data structure.

Structure:

  • Main artboard: "Recap"
  • Nested artboard A with List → should use "Entry" component artboard
  • Nested artboard B with List → should use "Summary-Entry" component artboard
  • Both Lists are bound to ViewModel type "Slide"

I configured the artboard list mapping in the Rive editor for each List independently. This works correctly in the editor preview - each List renders with its designated component artboard.
However, in the iOS SDK, both Lists render using the same component artboard. It appears the mapping rules are stored globally by ViewModel ID rather than per ArtboardComponentList instance.
Looking at the source code, I believe the issue is in artboard_component_list.cpp:

void ArtboardComponentList::addMapRule(ArtboardListMapRule* rule){    m_artboardMapRules[rule->viewModelId()] = rule->artboardId();}

This creates a one-to-one mapping from ViewModel ID to artboard ID

Expected behavior

Each Artboard instance should maintain its own mapping rules. The mapping configured per-List in the editor should be preserved at runtime, allowing the same ViewModel type to map to different Artboards in different Lists.

Workaround

Adding a "presentation" enum property to the ViewModel and using a state machine to toggle between visual states. This works but adds unnecessary complexity.

Device & Versions

  • Device: iOS Simulator
  • iOS version 26.2

Source

recap-repro.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions