File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,8 @@ public static function table(Table $table): Table
56
56
return $ table
57
57
->columns ([
58
58
Tables \Columns \TextColumn::make ('name ' )
59
- ->searchable (),
59
+ ->searchable ()
60
+ ->sortable (),
60
61
61
62
Tables \Columns \TextColumn::make ('templates_count ' ),
62
63
@@ -65,12 +66,14 @@ public static function table(Table $table): Table
65
66
->formatStateUsing (fn (?User $ state ) => $ state ?->getFilamentName() ?: '- ' ),
66
67
67
68
Tables \Columns \TextColumn::make ('created_at ' )
68
- ->dateTime (),
69
+ ->dateTime ()
70
+ ->sortable (),
69
71
])
70
72
->actions ([
71
73
Tables \Actions \EditAction::make (),
72
74
])
73
- ->bulkActions ([]);
75
+ ->bulkActions ([])
76
+ ->defaultSort ('name ' );
74
77
}
75
78
76
79
/**
Original file line number Diff line number Diff line change @@ -43,7 +43,9 @@ public static function table(Table $table): Table
43
43
{
44
44
return $ table
45
45
->columns ([
46
- Tables \Columns \TextColumn::make ('name ' )->searchable (),
46
+ Tables \Columns \TextColumn::make ('name ' )
47
+ ->searchable ()
48
+ ->sortable (),
47
49
48
50
Tables \Columns \TextColumn::make ('layout ' )
49
51
->label ('Layout ' )
@@ -53,7 +55,9 @@ public static function table(Table $table): Table
53
55
->label ('User ' )
54
56
->formatStateUsing (fn (?User $ state ) => $ state ?->getFilamentName() ?: '- ' ),
55
57
56
- Tables \Columns \TextColumn::make ('created_at ' )->dateTime (),
58
+ Tables \Columns \TextColumn::make ('created_at ' )
59
+ ->dateTime ()
60
+ ->sortable (),
57
61
])
58
62
->actions ([
59
63
Tables \Actions \EditAction::make (),
@@ -72,7 +76,8 @@ public static function table(Table $table): Table
72
76
]);
73
77
}),
74
78
])
75
- ->bulkActions ([]);
79
+ ->bulkActions ([])
80
+ ->defaultSort ('name ' );
76
81
}
77
82
78
83
/**
You can’t perform that action at this time.
0 commit comments