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: Account for grouping depth of more than one in width calculation.",
"type": "patch"
}
],
"packageName": "office-ui-fabric-react",
"email": "[email protected]"
}
Original file line number Diff line number Diff line change
Expand Up @@ -799,10 +799,10 @@ export class DetailsListBase extends BaseComponent<IDetailsListProps, IDetailsLi
props: IDetailsListProps,
firstIndex: number
): IColumn[] {
const { selectionMode, checkboxVisibility, groups } = props;
const { selectionMode, checkboxVisibility } = props;
const rowCheckWidth =
selectionMode !== SelectionMode.none && checkboxVisibility !== CheckboxVisibility.hidden ? CHECKBOX_WIDTH : 0;
const groupExpandWidth = groups ? GROUP_EXPAND_WIDTH : 0;
const groupExpandWidth = this._getGroupNestingDepth() * GROUP_EXPAND_WIDTH;
let totalWidth = 0; // offset because we have one less inner padding.
const availableWidth = viewportWidth - (rowCheckWidth + groupExpandWidth);
const adjustedColumns: IColumn[] = newColumns.map((column, i) => {
Expand Down