Skip to content

Conversation

@spmonahan
Copy link
Contributor

Cherry picks a change to DetailsList from master that adds isSelectedOnFocus.

Original pull request: #23467

NOTE: Cherry-pick from master branch.

Adds a new optional prop, `isSelectedOnFocus` to DetailsList to control
whether items in the list are selected on focus. By default the value
for this prop is `true` and the existing behavior of DetailsList is
preserved.

When setting this value to `false` the behavior in `onHeaderKeyDown` is
changed so that using the down arrow key to move from the header row to
the list proper will _not_ select the first item in the list. When
`isSelectedOnFocus` is set to `true` the first item in the list will
_always_ be selected (this is the behavior prior to this change).

Additionally, this prop is passed down to DetailsList's internal
SelectionZone as this prop also exists on that component. Previously
users could only pass this prop via the `selectionZoneProps` prop on
DetailsList. The default behavior for SelectionZone is also maintained
as the default value for its `isSelectedOnFocus` prop is also `true`.
@codesandbox-ci
Copy link

codesandbox-ci bot commented Jun 14, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 39af26b:

Sandbox Source
Fluent UI Button Configuration
codesandbox-react-template Configuration

@size-auditor
Copy link

size-auditor bot commented Jun 14, 2022

Asset size changes

Project Bundle Baseline Size New Size Difference
office-ui-fabric-react office-ui-fabric-react-DetailsList 221.182 kB 221.252 kB ExceedsBaseline     70 bytes
office-ui-fabric-react office-ui-fabric-react-ShimmeredDetailsList 231.639 kB 231.709 kB ExceedsBaseline     70 bytes

ExceedsTolerance Over Tolerance (1024 B) ExceedsBaseline Over Baseline BelowBaseline Below Baseline New New Deleted  Removed 1 kB = 1000 B

Baseline commit: 442e3fe9e02b8b858b8bd7ffa7a7fb27ac1a2222 (build)

@fabricteam
Copy link
Collaborator

fabricteam commented Jun 14, 2022

Perf Analysis

No significant results to display.

All results

Scenario Render type 7.0 Ticks PR Ticks Iterations Status
BaseButton mount 975 892 5000
Breadcrumb mount 42971 43076 5000
Checkbox mount 1562 1655 5000
CheckboxBase mount 1392 1364 5000
ChoiceGroup mount 5053 5011 5000
ComboBox mount 928 925 1000
CommandBar mount 8115 8113 1000
ContextualMenu mount 14338 14315 1000
DefaultButton mount 1182 1212 5000
DetailsRow mount 3890 3783 5000
DetailsRowFast mount 3784 3848 5000
DetailsRowNoStyles mount 3658 3600 5000
Dialog mount 2365 2291 1000
DocumentCardTitle mount 1825 1885 1000
Dropdown mount 2553 2532 5000
FocusTrapZone mount 1888 1844 5000
FocusZone mount 1825 1861 5000
IconButton mount 1745 1724 5000
Label mount 332 341 5000
Layer mount 2004 1997 5000
Link mount 440 428 5000
MenuButton mount 1518 1411 5000
MessageBar mount 2155 2068 5000
Nav mount 3331 3397 1000
OverflowSet mount 1471 1464 5000
Panel mount 1582 1542 1000
Persona mount 958 973 1000
Pivot mount 1455 1453 1000
PrimaryButton mount 1278 1307 5000
Rating mount 7970 7963 5000
SearchBox mount 1359 1363 5000
Shimmer mount 2599 2618 5000
Slider mount 1544 1632 5000
SpinButton mount 5095 5113 5000
Spinner mount 443 409 5000
SplitButton mount 3279 3202 5000
Stack mount 524 508 5000
StackWithIntrinsicChildren mount 1763 1698 5000
StackWithTextChildren mount 4846 4925 5000
SwatchColorPicker mount 10925 10815 5000
TagPicker mount 3045 2886 5000
TeachingBubble mount 51373 51482 5000
Text mount 445 444 5000
TextField mount 1427 1442 5000
Toggle mount 863 813 5000
button mount 109 121 5000

@spmonahan
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@spmonahan
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Co-authored-by: Esteban Munoz Facusse <esteban.230@hotmail.com>
@spmonahan spmonahan merged commit f98c798 into microsoft:7.0 Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants