mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-06 05:59:25 +08:00
Merge branch 'main' into next
This commit is contained in:
commit
231adb0b60
@ -473,18 +473,15 @@ export const Table: any = withDynamicSchemaProps(
|
|||||||
const highlightRowCss = useMemo(() => {
|
const highlightRowCss = useMemo(() => {
|
||||||
return css`
|
return css`
|
||||||
& > td {
|
& > td {
|
||||||
background-color: ${token.controlItemBgActiveHover} !important;
|
background-color: ${token.controlItemBgActive} !important;
|
||||||
}
|
}
|
||||||
&:hover > td {
|
&:hover > td {
|
||||||
background-color: ${token.controlItemBgActiveHover} !important;
|
background-color: ${token.controlItemBgActiveHover} !important;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
}, [token.controlItemBgActiveHover]);
|
}, [token.controlItemBgActive, token.controlItemBgActiveHover]);
|
||||||
|
|
||||||
const highlightRow = useMemo(
|
const highlightRow = useMemo(() => (onClickRow ? highlightRowCss : ''), [highlightRowCss, onClickRow]);
|
||||||
() => (onClickRow ? highlightRowCss : ''),
|
|
||||||
[onClickRow, token.controlItemBgActiveHover],
|
|
||||||
);
|
|
||||||
|
|
||||||
const onRow = useMemo(() => {
|
const onRow = useMemo(() => {
|
||||||
if (onClickRow) {
|
if (onClickRow) {
|
||||||
@ -589,7 +586,7 @@ export const Table: any = withDynamicSchemaProps(
|
|||||||
const BodyCellComponent = useCallback(
|
const BodyCellComponent = useCallback(
|
||||||
(props) => {
|
(props) => {
|
||||||
const isIndex = props.className?.includes('selection-column');
|
const isIndex = props.className?.includes('selection-column');
|
||||||
const { record, schema, rowIndex } = props;
|
const { record, schema, rowIndex, ...others } = props;
|
||||||
const { ref, inView } = useInView({
|
const { ref, inView } = useInView({
|
||||||
threshold: 0,
|
threshold: 0,
|
||||||
triggerOnce: true,
|
triggerOnce: true,
|
||||||
@ -602,7 +599,7 @@ export const Table: any = withDynamicSchemaProps(
|
|||||||
// fix the problem of blank rows at the beginning of a table block
|
// fix the problem of blank rows at the beginning of a table block
|
||||||
if (rowIndex < 20) {
|
if (rowIndex < 20) {
|
||||||
return (
|
return (
|
||||||
<td {...props} className={classNames(props.className, cellClass)} style={style}>
|
<td {...others} className={classNames(props.className, cellClass)} style={style}>
|
||||||
{props.children}
|
{props.children}
|
||||||
</td>
|
</td>
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user