Dropdown: Tweak prop destructuring to be TypeScript friendly#38431
Merged
aaronrobertshaw merged 1 commit intotrunkfrom Feb 3, 2022
Merged
Dropdown: Tweak prop destructuring to be TypeScript friendly#38431aaronrobertshaw merged 1 commit intotrunkfrom
aaronrobertshaw merged 1 commit intotrunkfrom
Conversation
|
Size Change: +5 B (0%) Total Size: 1.14 MB
ℹ️ View Unchanged
|
7 tasks
andrewserong
approved these changes
Feb 3, 2022
Contributor
andrewserong
left a comment
There was a problem hiding this comment.
The destructuring after this change looks semantically the same (I also have a personal preference for it happening in the body of the function, so that the props object is available for potential future changes, too), so this LGTM!
Also quickly smoke tested in the editor and storybook that the Dropdown component still works correctly 👍
8 tasks
Contributor
Author
|
Changelog for this will be added via: #38469 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #37769
Description
As part of implementing new typed border control components, they needed a dropdown. The change in this PR to destructuring the dropdown's props eliminates a TypeScript error avoiding any need for typing the dropdown component until we're ready.
Testing Instructions
Types of changes
Enhancement
Checklist:
*.native.jsfiles for terms that need renaming or removal).