-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[TS migration] Migrate 'SelectionList' component to TypeScript #34008
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
Merged
mountiny
merged 32 commits into
Expensify:main
from
software-mansion-labs:@szymczak/SelectionList
Jan 17, 2024
Merged
Changes from 9 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
9080382
migrate everything that is possible at the moment
SzymczakJ 0286975
Merge branch 'main' into @szymczak/SelectionList
filip-solecki ccf6799
Merge branch 'main' into @szymczak/SelectionList
filip-solecki 609b1d6
Merge branch 'main' into @szymczak/SelectionList
filip-solecki 8e42f27
Finish SelectionList migration
filip-solecki 49876fc
Fix disabled prop
filip-solecki 8407cd5
Merge branch 'main' into @szymczak/SelectionList
filip-solecki 15bc6e4
Merge branch 'main' into @szymczak/SelectionList
filip-solecki cc38c94
CR fixes
filip-solecki 1e5f8fa
Merge branch 'main' into @szymczak/SelectionList
filip-solecki 35e32da
CR fixes
filip-solecki af6f16d
Remove Boolean usage
filip-solecki 376a9eb
Revert netiveID
filip-solecki da3b58d
Remove last Boolean usage
filip-solecki 1335606
Fix isUserItem check
filip-solecki 92d185c
Fix failing TS check
filip-solecki f558520
Fixes after CR
filip-solecki f5e7e0c
Merge branch 'main' into @szymczak/SelectionList
filip-solecki 4948e7c
Merge branch 'main' into @szymczak/SelectionList
filip-solecki 882157b
Merge branch 'main' into @szymczak/SelectionList
filip-solecki 120a02e
Extend SelectionList types
filip-solecki 7beb4dc
Improvements after review
filip-solecki c9970e4
Make SelectionList Generic component
filip-solecki cdf56a9
Fix TextInput focus
filip-solecki 83a001e
Merge branch 'main' into @szymczak/SelectionList
filip-solecki 34d8b4f
Extend type after main marge
filip-solecki c83e106
Fix type error
filip-solecki ab1cb39
Merge branch 'main' into @szymczak/SelectionList
filip-solecki 364da34
Merge branch 'main' into @szymczak/SelectionList
filip-solecki 275ef32
Remove developer comments
filip-solecki e030135
Add props description
filip-solecki 7d65ede
Add props descriptions
filip-solecki File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
import React, {forwardRef} from 'react'; | ||
import type {ForwardedRef} from 'react'; | ||
import {SectionList as RNSectionList} from 'react-native'; | ||
import type ForwardedSectionList from './types'; | ||
import type {SectionListProps} from 'react-native'; | ||
|
||
// eslint-disable-next-line react/function-component-definition | ||
const SectionList: ForwardedSectionList = (props, ref) => ( | ||
<RNSectionList | ||
// eslint-disable-next-line react/jsx-props-no-spreading | ||
{...props} | ||
ref={ref} | ||
/> | ||
); | ||
|
||
SectionList.displayName = 'SectionList'; | ||
function SectionList<ItemT, SectionT>(props: SectionListProps<ItemT, SectionT>, ref: ForwardedRef<RNSectionList<ItemT, SectionT>>) { | ||
return ( | ||
<RNSectionList | ||
// eslint-disable-next-line react/jsx-props-no-spreading | ||
{...props} | ||
ref={ref} | ||
/> | ||
); | ||
} | ||
|
||
export default forwardRef(SectionList); |
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.