-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix BasePicker's onDismiss behavior from changing if getTextFromItem provided #14302
Conversation
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 d0a75b6:
|
Perf AnalysisNo significant results to display. All results
Perf Analysis (Fluent)Perf comparison
Perf tests with no regressions
|
Asset size changes
Over Tolerance (1024 B) Over Baseline Below Baseline New Removed 1 kB = 1000 B Baseline commit: f2c29686e5fb0d71db3a1e02ee4a7f3fdc185d03 (build) |
@xugao @joschect Hey! I'm not very familiar with the workflow here. Is the recommendation saying to update my fork with the main repo, to create another PR, or something else entirely? |
packages/office-ui-fabric-react/src/components/pickers/BasePicker.tsx
Outdated
Show resolved
Hide resolved
if you pull master again , the size auditor error should go away
|
merge master
I think I understand, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thanks for making this pr. I have a few comments but other than that it should be ready!
packages/office-ui-fabric-react/src/components/pickers/BasePicker.tsx
Outdated
Show resolved
Hide resolved
packages/office-ui-fabric-react/src/components/pickers/BasePicker.types.ts
Show resolved
Hide resolved
🎉 Handy links: |
…provided (microsoft#14302) * BasePicker's onDismiss can now return a boolean to decide if an item is selected * fixed a typo Co-authored-by: James <[email protected]>
Pull request checklist
getTextFromItem
changes dismiss behavior #10892$ yarn change
Description of changes
As suggested in #10892, this changes the return type of the BasePicker's onDismiss prop to optionally return a boolean. If it returns false, then the first suggested item is not selected when the suggestions callout is dismissed. If it returns anything else, then the default behavior of it selecting the first suggestion is preserved.
Focus areas to test
The BasePicker and its derivatives (like TagPicker)