Skip to content

feat: get item index in itemLabel on Repeater#19430

Open
pintend wants to merge 4 commits intofilamentphp:4.xfrom
pintend:feat-repeater-itemlabel-index-x4
Open

feat: get item index in itemLabel on Repeater#19430
pintend wants to merge 4 commits intofilamentphp:4.xfrom
pintend:feat-repeater-itemlabel-index-x4

Conversation

@pintend
Copy link
Copy Markdown

@pintend pintend commented Mar 5, 2026

passes the index to getItemLabel() so we can do something like this

Repeater::make()
    ->itemLabel(function (int $index) {
        return match($index) {
            0 => 'Primary',
            default => 'Backup',
        };
    })
image

@github-project-automation github-project-automation bot moved this to Todo in Roadmap Mar 5, 2026
@pintend pintend changed the title pass index to getItemLabel feat: get item index in itemLabel on Repeater Mar 5, 2026
@danharrin danharrin added enhancement New feature or request pending review labels Mar 6, 2026
@danharrin danharrin modified the milestone: v4 Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants