Can you make columns display vertically?
My infolist currently has 4 textEntry items:
Section::make('Customer details')
->columns(2)
->schema([
TextEntry::make('Item 1'),
TextEntry::make('Item 2'),
TextEntry::make('Item 3'),
TextEntry::make('Item 4'),
])
...and it displays like this
+--------+---------+
| Item 1 | Item 2 |
+--------+---------+
| Item 3 | Item 4 |
+--------+---------+
Is there a way without rearranging the order of the items to make them stack vertically instead of horizontally?
i.e.
+--------+---------+
| Item 1 | Item 3 |
+--------+---------+
| Item 2 | Item 4 |
+--------+---------+
Solution:Jump to solution
Ah this works:
Section::make('Customer details')
->columns(2)
->schema([...
5 Replies
Split::make([
Stack::make([
TextColumn::make('1'),
TextColumn::make('2')
]),
Stack::make([
TextColumn::make('3'),
TextColumn::make('4')
])
])
Thanks for replying.
Is it possible to use Stack within an infolist?
use grid and column
Like this?
Section::make('Customer details')
->schema([
Grid::make(2)
->columns(2)
->schema([
TextEntry::make('Item 1'),
TextEntry::make('Item 2'),
TextEntry::make('Item 3'),
TextEntry::make('Item 4')
])
])
It still shows as
+--------+---------+
| Item 1 | Item 2 |
+--------+---------+
| Item 3 | Item 4 |
+--------+---------+
Solution
Ah this works:
Section::make('Customer details')
->columns(2)
->schema([
Grid::make(1)
->columns(1)
->schema([
TextEntry::make('Item 1'),
TextEntry::make('Item 2'),
]),
Grid::make(1)
->columns(1)
->schema([
TextEntry::make('Item 3'),
TextEntry::make('Item 4')
])
])