The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Selected row background (#1299)
brendanlaschkeb0c2881ec0bc
diff --git a/front/src/modules/ui/table/components/EntityTableRow.tsx b/front/src/modules/ui/table/components/EntityTableRow.tsxindex cc09351bafb..f744faf3cc5 100644--- a/front/src/modules/ui/table/components/EntityTableRow.tsx+++ b/front/src/modules/ui/table/components/EntityTableRow.tsx@@ -2,6 +2,7 @@ import styled from '@emotion/styled';import { useRecoilValue } from 'recoil';import { ViewFieldContext } from '../contexts/ViewFieldContext';+import { useCurrentRowSelected } from '../hooks/useCurrentRowSelected';import { visibleTableColumnsState } from '../states/tableColumnsState';import { CheckboxCell } from './CheckboxCell';@@ -9,16 +10,17 @@ import { EntityTableCell } from './EntityTableCell';const StyledRow = styled.tr<{ selected: boolean }>`background: ${(props) =>- props.selected ? props.theme.background.secondary : 'none'};+ props.selected ? props.theme.accent.quaternary : 'none'};`;export function EntityTableRow({ rowId }: { rowId: string }) {const columns = useRecoilValue(visibleTableColumnsState);+ const { currentRowSelected } = useCurrentRowSelected();return (<StyledRowdata-testid={`row-id-${rowId}`}- selected={false}+ selected={currentRowSelected}data-selectable-id={rowId}><td>