Skip to content

Commit

Permalink
Merge pull request #3810 from SherpasGroup/fix-detailslist-focus
Browse files Browse the repository at this point in the history
Fix for details list selection and focus
  • Loading branch information
wobba authored Jun 24, 2024
2 parents d553f41 + bdfa793 commit 683ba9a
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions search-parts/src/components/DetailsListComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -430,13 +430,6 @@ export class DetailsListComponent extends React.Component<IDetailsListComponentP

const { columns, items } = this.state;

let focusIndex = -1;
if (this.props.selectedKeys && this.props.selectedKeys.length > 0) {
const key = this.props.selectedKeys[0];
focusIndex = items.findIndex(item => item.key == key);
}


let shimmeredDetailsListProps: IShimmeredDetailsListProps = {
theme: this.props.themeVariant as ITheme,
items: items,
Expand All @@ -446,7 +439,6 @@ export class DetailsListComponent extends React.Component<IDetailsListComponentP
selection: this._selection,
layoutMode: DetailsListLayoutMode.justified,
isHeaderVisible: true,
initialFocusedIndex: focusIndex,
enableShimmer: this.props.showShimmers,
selectionPreservedOnEmptyClick: true,
enterModalSelectionOnTouch: true,
Expand Down

0 comments on commit 683ba9a

Please sign in to comment.