@ -2,6 +2,7 @@ import styled from '@emotion/styled';
|
|||||||
import { useRecoilValue } from 'recoil';
|
import { useRecoilValue } from 'recoil';
|
||||||
|
|
||||||
import { ViewFieldContext } from '../contexts/ViewFieldContext';
|
import { ViewFieldContext } from '../contexts/ViewFieldContext';
|
||||||
|
import { useCurrentRowSelected } from '../hooks/useCurrentRowSelected';
|
||||||
import { visibleTableColumnsState } from '../states/tableColumnsState';
|
import { visibleTableColumnsState } from '../states/tableColumnsState';
|
||||||
|
|
||||||
import { CheckboxCell } from './CheckboxCell';
|
import { CheckboxCell } from './CheckboxCell';
|
||||||
@ -9,16 +10,17 @@ import { EntityTableCell } from './EntityTableCell';
|
|||||||
|
|
||||||
const StyledRow = styled.tr<{ selected: boolean }>`
|
const StyledRow = styled.tr<{ selected: boolean }>`
|
||||||
background: ${(props) =>
|
background: ${(props) =>
|
||||||
props.selected ? props.theme.background.secondary : 'none'};
|
props.selected ? props.theme.accent.quaternary : 'none'};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export function EntityTableRow({ rowId }: { rowId: string }) {
|
export function EntityTableRow({ rowId }: { rowId: string }) {
|
||||||
const columns = useRecoilValue(visibleTableColumnsState);
|
const columns = useRecoilValue(visibleTableColumnsState);
|
||||||
|
const { currentRowSelected } = useCurrentRowSelected();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledRow
|
<StyledRow
|
||||||
data-testid={`row-id-${rowId}`}
|
data-testid={`row-id-${rowId}`}
|
||||||
selected={false}
|
selected={currentRowSelected}
|
||||||
data-selectable-id={rowId}
|
data-selectable-id={rowId}
|
||||||
>
|
>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
Reference in New Issue
Block a user