fix sorting and add opacity while sorting
This commit is contained in:
@@ -22,7 +22,6 @@ export async function getUserFilesData({
|
|||||||
query?: string;
|
query?: string;
|
||||||
}) {
|
}) {
|
||||||
const token = await getSessionData('token');
|
const token = await getSessionData('token');
|
||||||
/* console.log('getUserFilesData', { page, pageSize, sortBy, sortOrder, type, date, query }); */
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`${API_BASE_URL}/api/v1/data`, {
|
const response = await fetch(`${API_BASE_URL}/api/v1/data`, {
|
||||||
|
|||||||
@@ -48,11 +48,11 @@ export function MonitoringDropDown({ file }: {
|
|||||||
};
|
};
|
||||||
}, [dropdownRef, setIsOpen, isOpen]);
|
}, [dropdownRef, setIsOpen, isOpen]);
|
||||||
|
|
||||||
/* useEffect(() => {
|
useEffect(() => {
|
||||||
if (file.monitoring) {
|
if (file.monitoring) {
|
||||||
setCurrentMonitoringStatus(file.monitoring ? file.monitoring : 'NONE');
|
setCurrentMonitoringStatus(file.monitoring ? file.monitoring : 'NONE');
|
||||||
}
|
}
|
||||||
}, [file.monitoring]); */
|
}, [file.monitoring]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isOpen && buttonRef.current) {
|
if (isOpen && buttonRef.current) {
|
||||||
|
|||||||
@@ -141,6 +141,7 @@ export default function TanstakFilesTable({ fileType }: { fileType: string }) {
|
|||||||
const {
|
const {
|
||||||
data: apiResponse,
|
data: apiResponse,
|
||||||
isLoading,
|
isLoading,
|
||||||
|
isFetching,
|
||||||
isError,
|
isError,
|
||||||
error,
|
error,
|
||||||
refetch
|
refetch
|
||||||
@@ -876,7 +877,7 @@ export default function TanstakFilesTable({ fileType }: { fileType: string }) {
|
|||||||
</tr>
|
</tr>
|
||||||
))}
|
))}
|
||||||
</thead>
|
</thead>
|
||||||
<tbody className="tanstak-table-body">
|
<tbody className={`tanstak-table-body ${isFetching ? 'loading' : ''}`}>
|
||||||
{table.getRowModel().rows.length > 0 ? (
|
{table.getRowModel().rows.length > 0 ? (
|
||||||
table.getRowModel().rows.map(row => (
|
table.getRowModel().rows.map(row => (
|
||||||
<tr key={row.id}>
|
<tr key={row.id}>
|
||||||
|
|||||||
@@ -855,6 +855,10 @@
|
|||||||
&-body {
|
&-body {
|
||||||
background-color: v.$white;
|
background-color: v.$white;
|
||||||
|
|
||||||
|
&.loading {
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
>*+* {
|
>*+* {
|
||||||
border-top: 1px solid v.$b-color-2;
|
border-top: 1px solid v.$b-color-2;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user