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