|
|
@@ -8,7 +8,7 @@ import {
|
|
|
} from '@hooks';
|
|
|
import {PAGE_SIZE_LIST} from '@utils';
|
|
|
import {ReactElement} from 'react';
|
|
|
-import {useTable} from './hooks';
|
|
|
+import {useTable, useTableShadow} from './hooks';
|
|
|
import {flexRender} from '@tanstack/react-table';
|
|
|
import css from './index.module.css';
|
|
|
import HeaderTh from './header-th';
|
|
|
@@ -60,6 +60,8 @@ function Table<T extends Record<string, any>>(props: Props<T>): ReactElement {
|
|
|
|
|
|
const sensor = useSensor(PointerSensor);
|
|
|
|
|
|
+ const isEnd = useTableShadow(getCenterTotalSize());
|
|
|
+
|
|
|
return (
|
|
|
<Spin spinning={isSearching}>
|
|
|
<div
|
|
|
@@ -79,7 +81,12 @@ function Table<T extends Record<string, any>>(props: Props<T>): ReactElement {
|
|
|
)}
|
|
|
strategy={horizontalListSortingStrategy}
|
|
|
>
|
|
|
- <table className={css.table} style={{width: getCenterTotalSize()}}>
|
|
|
+ <table
|
|
|
+ className={classNames(css.table, {
|
|
|
+ [css.tableFixedShadow]: !isEnd,
|
|
|
+ })}
|
|
|
+ style={{width: getCenterTotalSize()}}
|
|
|
+ >
|
|
|
<thead className={css.tableHead}>
|
|
|
{getHeaderGroups().map(function ({id, headers}) {
|
|
|
return (
|
|
|
@@ -108,7 +115,9 @@ function Table<T extends Record<string, any>>(props: Props<T>): ReactElement {
|
|
|
return (
|
|
|
<td
|
|
|
key={id}
|
|
|
- className={classNames({[css.fixedRight]: fixed})}
|
|
|
+ className={classNames({
|
|
|
+ [css.fixedRight + ' fixed-shadow']: fixed,
|
|
|
+ })}
|
|
|
style={{
|
|
|
width: column.getSize(),
|
|
|
textAlign: align ?? 'left',
|