© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2mo ago•
3 replies
harumi

expandableLimitedList with listWithLineBreaks positions

Table builder4️⃣v4
hi how can i make expandable limited list with vertical positions. when i add the
listWithLineBreaks
listWithLineBreaks
it change to horizontal positions but the show more button is working, when i remove the
listWithLineBreaks
listWithLineBreaks
the positions is vertical but show more button is not working anymore,

TextColumn::make('item_group')
    ->label('Item Group')
    ->badge()
    ->separator(',')
    ->limitList(3)
    ->expandableLimitedList()
    ->listWithLineBreaks()
    ->formatStateUsing(function ($state) {
        if (! $state) {
            return [];
        }

        if (is_string($state)) {
            $decoded = json_decode($state, true);

            $state = is_array($decoded)
                ? $decoded
                : explode(',', $state);
        }

        return collect($state)
            ->map(fn ($item) => trim(str_replace(['"', '[', ']'], '', $item)))
            ->filter()
            ->values()
            ->first();
    }),
TextColumn::make('item_group')
    ->label('Item Group')
    ->badge()
    ->separator(',')
    ->limitList(3)
    ->expandableLimitedList()
    ->listWithLineBreaks()
    ->formatStateUsing(function ($state) {
        if (! $state) {
            return [];
        }

        if (is_string($state)) {
            $decoded = json_decode($state, true);

            $state = is_array($decoded)
                ? $decoded
                : explode(',', $state);
        }

        return collect($state)
            ->map(fn ($item) => trim(str_replace(['"', '[', ']'], '', $item)))
            ->filter()
            ->values()
            ->first();
    }),
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

expandableLimitedList without listWithLineBreaks
FilamentFFilament / ❓┊help
2y ago
->recordUrl(null) with ->expandableLimitedList()
FilamentFFilament / ❓┊help
10mo ago
Infolist - TextEntry - listWithLineBreaks
FilamentFFilament / ❓┊help
2y ago
expandableLimitedList SPA BUG?
FilamentFFilament / ❓┊help
2y ago