Skip to content

v4 Unordered list columns() method doesn't work #16832

@binaryfire

Description

@binaryfire

Package

filament/filament

Package Version

4-beta13

Laravel Version

12

Livewire Version

3

PHP Version

8.4

Problem description

The ->columns() method doesn't do anything on the UnorderedList component at the moment. This:

UnorderedList::make([
    Text::make('Lorem ipsum'),
    Text::make('Dolor sit amet'),
    Text::make('Consectetur adipiscing'),
    Text::make('Sed do eiusmod'),
    Text::make('Tempor incididunt'),
    Text::make('Ut labore et dolore'),
    Text::make('Magna aliqua'),
    Text::make('Ut enim ad minim'),
    Text::make('Veniam quis nostrud'),
    Text::make('Exercitation ullamco'),
])
->columns(1),

Results in this:

Image

Currently you have to use extraAttributes() to force it:

UnorderedList::make([
    Text::make('Lorem ipsum'),
    Text::make('Dolor sit amet'),
    Text::make('Consectetur adipiscing'),
    Text::make('Sed do eiusmod'),
    Text::make('Tempor incididunt'),
    Text::make('Ut labore et dolore'),
    Text::make('Magna aliqua'),
    Text::make('Ut enim ad minim'),
    Text::make('Veniam quis nostrud'),
    Text::make('Exercitation ullamco'),
])
->extraAttributes(['style' => 'columns: 1 !important;'])

Result:
Image

Expected behavior

Using ->columns() on UnorderedLists should set the number of columns as per other components.

Steps to reproduce

  1. Clone repo
  2. Go to "Unordered List Columns" page

Reproduction repository (issue will be closed if this is not valid)

https://github.com/binaryfire/filament-bug-reproduction

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Todo

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions