Skip to content

fix(repeater-native): resolve workaround complexity with empty state support - #26

Open
Andries-Smit wants to merge 2 commits into
mendix:mainfrom
Andries-Smit:feat/repeater-empty
Open

fix(repeater-native): resolve workaround complexity with empty state support#26
Andries-Smit wants to merge 2 commits into
mendix:mainfrom
Andries-Smit:feat/repeater-empty

Conversation

@Andries-Smit

@Andries-Smit Andries-Smit commented Feb 7, 2023

Copy link
Copy Markdown
Contributor

Fix: Add empty state configuration for Repeater widget

Problem

When a Repeater displays no data, there is currently no way to show users a meaningful message or placeholder. This creates a poor UX where empty lists appear broken or unresponsive.

As a workaround, developers must create a surrounding context that:

  • Manually counts results in advance
  • Conditionally shows/hides UI based on the count
  • Refreshes the entire context when data changes to zero

This workaround is error-prone and adds unnecessary model complexity.

Solution

Add an emptyListContent configuration property to Repeater, allowing developers to define custom content shown when the list is empty.

This:

  • Eliminates the need for manual count logic
  • Simplifies the data model
  • Provides a consistent UX pattern (aligns with Gallery widget behavior)
  • Reduces maintenance overhead

Context

Other data container widgets (ListView, Repeater in scroll context) cannot be safely nested in ScrollViews due to VirtualizedList conflicts. The Repeater is often the only viable option in these scenarios, making the empty state configuration essential for real-world applications.

Reference

This implementation follows the existing pattern in the Gallery widget: https://github.com/mendix/native-widgets/blob/main/packages/pluggableWidgets/gallery-native/src/Gallery.xml#L59

@Andries-Smit
Andries-Smit requested a review from a team as a code owner February 7, 2023 13:50
@moo-team moo-team added the Widget label Feb 7, 2023
@Andries-Smit
Andries-Smit force-pushed the feat/repeater-empty branch from 8545627 to 5443261 Compare June 5, 2025 11:55
@Andries-Smit
Andries-Smit force-pushed the feat/repeater-empty branch 2 times, most recently from 25f5701 to 595a3a2 Compare February 27, 2026 10:24
@Andries-Smit
Andries-Smit force-pushed the feat/repeater-empty branch from 595a3a2 to 92537e9 Compare July 3, 2026 14:55
@Andries-Smit Andries-Smit changed the title feat(repeater-native): add empty content fix(repeater-native): add empty content Sep 2, 2026
@Andries-Smit Andries-Smit changed the title fix(repeater-native): add empty content fix(repeater-native): show empty content placeholder Sep 2, 2026
@Andries-Smit Andries-Smit changed the title fix(repeater-native): show empty content placeholder fix(repeater-native): resolve workaround complexity with empty state support Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants