Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "office-ui-fabric-react",
"comment": "DetailsList: Added ability to add css class to checkbox cell",
"type": "minor"
}
],
"packageName": "office-ui-fabric-react",
"email": "[email protected]"
}
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,11 @@ export interface IDetailsListProps extends React.Props<DetailsList>, IWithViewpo
* The default implementation will virtualize when this callback is not provided.
*/
onShouldVirtualize?: (props: IListProps) => boolean;

/**
* Optional class name to add to the cell of a checkbox
*/
checkboxCellClassName?: string;
}

export interface IColumn {
Expand Down Expand Up @@ -399,4 +404,4 @@ export enum CheckboxVisibility {
* Hide checkboxes.
*/
hidden = 2
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ export class DetailsList extends BaseComponent<IDetailsListProps, IDetailsListSt
checkboxVisibility,
getRowAriaLabel,
checkButtonAriaLabel,
checkboxCellClassName,
groupProps
} = this.props;
let collapseAllVisibility = groupProps && groupProps.collapseAllVisibility;
Expand Down Expand Up @@ -431,7 +432,8 @@ export class DetailsList extends BaseComponent<IDetailsListProps, IDetailsListSt
checkboxVisibility: checkboxVisibility,
collapseAllVisibility: collapseAllVisibility,
getRowAriaLabel: getRowAriaLabel,
checkButtonAriaLabel: checkButtonAriaLabel
checkButtonAriaLabel: checkButtonAriaLabel,
checkboxCellClassName: checkboxCellClassName,
}, this._onRenderRow);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ $detailsList-item-focus-meta-text-color: $ms-color-neutralDark;
}
}


.isPadded {
@include ms-padding-right($isPaddedMargin + $rowHorizontalPadding);

Expand All @@ -230,4 +231,4 @@ $detailsList-item-focus-meta-text-color: $ms-color-neutralDark;
.cellMeasurer .cell {
overflow: visible;
white-space: nowrap;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export interface IDetailsRowProps extends React.Props<DetailsRow> {
collapseAllVisibility?: CollapseAllVisibility;
getRowAriaLabel?: (item: any) => string;
checkButtonAriaLabel?: string;
checkboxCellClassName?: string;
}

export interface IDetailsRowSelectionState {
Expand Down Expand Up @@ -184,6 +185,7 @@ export class DetailsRow extends BaseComponent<IDetailsRowProps, IDetailsRowState
checkboxVisibility,
getRowAriaLabel,
checkButtonAriaLabel,
checkboxCellClassName,
selection
} = this.props;
const { columnMeasureInfo, isDropping, groupNestingDepth } = this.state;
Expand Down Expand Up @@ -230,7 +232,7 @@ export class DetailsRow extends BaseComponent<IDetailsRowProps, IDetailsRowState
role='gridcell'
aria-colindex={ 0 }
data-selection-toggle={ true }
className={ css('ms-DetailsRow-cell', 'ms-DetailsRow-cellCheck', checkStyles.owner, styles.cell, styles.checkCell) }
className={ css('ms-DetailsRow-cell', 'ms-DetailsRow-cellCheck', checkStyles.owner, styles.cell, styles.checkCell, checkboxCellClassName) }
>
{ onRenderCheck({
isSelected,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}

button.check {
height: 100%;
height: 40px;
width: 40px;
padding: 0;
margin: 0;
Expand Down