[Enhancement] Add sorting, pagination, and new attributes to sources index table (#510)
* WIP - started improving handling of sorting for sources index table * WIP - Added UI to table to indicate sort column and direction * Refactored toggle liveview into a livecomponent * Added sorting for all table attrs * Added pagination to the sources table * Added tests for updated liveviews and live components * Add tests for new helper methods * Added fancy new CSS to my sources table * Added size to sources table * Adds relative div to ensure that sorting arrow doesn't run away * Fixed da tests
This commit is contained in:
@@ -11,8 +11,12 @@
|
||||
|
||||
<div class="rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark">
|
||||
<div class="max-w-full overflow-x-auto">
|
||||
<div class="flex flex-col gap-10 min-w-max">
|
||||
{live_render(@conn, PinchflatWeb.Sources.IndexTableLive)}
|
||||
</div>
|
||||
{live_render(@conn, PinchflatWeb.Sources.SourceLive.IndexTableLive,
|
||||
session: %{
|
||||
"initial_sort_key" => :custom_name,
|
||||
"initial_sort_direction" => :asc,
|
||||
"results_per_page" => 10
|
||||
}
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user