|
|
@ -151,23 +151,23 @@ function Table({ columns, data }) { |
|
|
|
// we can add them into the header props
|
|
|
|
// we can add them into the header props
|
|
|
|
<th |
|
|
|
<th |
|
|
|
scope="col" |
|
|
|
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.getHeaderProps( |
|
|
|
column.getSortByToggleProps() |
|
|
|
column.getSortByToggleProps() |
|
|
|
)} |
|
|
|
)} |
|
|
|
> |
|
|
|
> |
|
|
|
<div className="flex items-center justify-between"> |
|
|
|
<div className="flex items-center"> |
|
|
|
{column.render("Header")} |
|
|
|
{column.render("Header")} |
|
|
|
{/* Add a sort direction indicator */} |
|
|
|
{/* Add a sort direction indicator */} |
|
|
|
<span> |
|
|
|
<span> |
|
|
|
{column.isSorted ? ( |
|
|
|
{column.isSorted ? ( |
|
|
|
column.isSortedDesc ? ( |
|
|
|
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> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -225,7 +225,8 @@ function Table({ columns, data }) { |
|
|
|
{/* numbers */} |
|
|
|
{/* numbers */} |
|
|
|
<div className="flex gap-x-2 items-baseline"> |
|
|
|
<div className="flex gap-x-2 items-baseline"> |
|
|
|
<span className="text-sm text-gray-700"> |
|
|
|
<span className="text-sm text-gray-700"> |
|
|
|
صفحه <span className="font-medium">{state.pageIndex + 1}</span> از |
|
|
|
صفحه <span className="font-medium"> {state.pageIndex + 1} </span> |
|
|
|
|
|
|
|
از |
|
|
|
<span className="font-medium"> {pageOptions.length} </span> |
|
|
|
<span className="font-medium"> {pageOptions.length} </span> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
<label> |
|
|
|
<label> |
|
|
|