|
|
|
@ -151,23 +151,23 @@ function Table({ columns, data }) { |
|
|
|
|
// we can add them into the header props
|
|
|
|
|
<th |
|
|
|
|
scope="col" |
|
|
|
|
className="group px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider" |
|
|
|
|
className="px-6 py-3 text-xs text-blue-600 bg-gray-200" |
|
|
|
|
{...column.getHeaderProps( |
|
|
|
|
column.getSortByToggleProps() |
|
|
|
|
)} |
|
|
|
|
> |
|
|
|
|
<div className="flex items-center justify-between"> |
|
|
|
|
<div className="flex items-center"> |
|
|
|
|
{column.render("Header")} |
|
|
|
|
{/* Add a sort direction indicator */} |
|
|
|
|
<span> |
|
|
|
|
{column.isSorted ? ( |
|
|
|
|
column.isSortedDesc ? ( |
|
|
|
|
<SortDownIcon className="w-4 h-4 text-gray-400" /> |
|
|
|
|
<SortUpIcon className="w-4 h-4 text-gray-400 mr-1" /> |
|
|
|
|
) : ( |
|
|
|
|
<SortUpIcon className="w-4 h-4 text-gray-400" /> |
|
|
|
|
<SortDownIcon className="w-4 h-4 text-gray-400 mr-1" /> |
|
|
|
|
) |
|
|
|
|
) : ( |
|
|
|
|
<SortIcon className="w-4 h-4 text-gray-400 opacity-0 group-hover:opacity-100" /> |
|
|
|
|
<SortIcon className="w-4 h-4 text-gray-400 opacity-0 group-hover:opacity-100 mr-1" /> |
|
|
|
|
)} |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
@ -225,8 +225,9 @@ function Table({ columns, data }) { |
|
|
|
|
{/* numbers */} |
|
|
|
|
<div className="flex gap-x-2 items-baseline"> |
|
|
|
|
<span className="text-sm text-gray-700"> |
|
|
|
|
صفحه <span className="font-medium">{state.pageIndex + 1}</span> از |
|
|
|
|
<span className="font-medium">{pageOptions.length}</span> |
|
|
|
|
صفحه <span className="font-medium"> {state.pageIndex + 1} </span> |
|
|
|
|
از |
|
|
|
|
<span className="font-medium"> {pageOptions.length} </span> |
|
|
|
|
</span> |
|
|
|
|
<label> |
|
|
|
|
<span className="sr-only">ایتم های موجود در هر صفحه</span> |
|
|
|
|