Web: Components: add fill select row
This commit is contained in:
parent
09e260d259
commit
d0973d8a86
@ -178,6 +178,7 @@ const StyledTableRow = styled.div`
|
||||
`;
|
||||
|
||||
const StyledTableCell = styled.div`
|
||||
background: ${(props) => props.checked && "#f8f9f9 !important"};
|
||||
/* padding-right: 8px; */
|
||||
height: 40px;
|
||||
max-height: 40px;
|
||||
|
@ -2,11 +2,12 @@ import React from "react";
|
||||
import PropTypes from "prop-types";
|
||||
import { StyledTableCell } from "./StyledTableContainer";
|
||||
|
||||
const TableCell = ({ className, forwardedRef, ...rest }) => {
|
||||
const TableCell = ({ className, forwardedRef, checked, ...rest }) => {
|
||||
return (
|
||||
<StyledTableCell
|
||||
className={`${className} table-container_cell`}
|
||||
ref={forwardedRef}
|
||||
checked={checked}
|
||||
{...rest}
|
||||
/>
|
||||
);
|
||||
@ -15,6 +16,7 @@ const TableCell = ({ className, forwardedRef, ...rest }) => {
|
||||
TableCell.propTypes = {
|
||||
className: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
|
||||
forwardedRef: PropTypes.shape({ current: PropTypes.any }),
|
||||
checked: PropTypes.bool,
|
||||
};
|
||||
|
||||
export default TableCell;
|
||||
|
@ -68,7 +68,12 @@ const TableRow = (props) => {
|
||||
</TableCell>
|
||||
{children}
|
||||
<div>
|
||||
<TableCell {...selectionProp} style={style} forwardedRef={row}>
|
||||
<TableCell
|
||||
{...selectionProp}
|
||||
style={style}
|
||||
forwardedRef={row}
|
||||
checked={checked}
|
||||
>
|
||||
<ContextMenu ref={cm} model={contextOptions}></ContextMenu>
|
||||
{renderContext ? (
|
||||
<ContextMenuButton
|
||||
|
Loading…
Reference in New Issue
Block a user