Skip to content
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

SectionList: sections "no overload match" error when trying to pass differently typed data props. #32447

Closed
CoryWritesCode opened this issue Oct 20, 2021 · 7 comments
Labels
Component: SectionList Needs: Attention Issues where the author has responded to feedback. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@CoryWritesCode
Copy link

CoryWritesCode commented Oct 20, 2021

Description

When you pass data to a section of a SectionList, TS throws an error if the data structures are not of the same type. As seen here it doesn't seem like each section should explicitly have their own section type. Otherwise I would need to create an overly cumbersome set of Flatlists or normalize each data set to be one of each of the options passed.

Version

0.65.1

Output of react-native info

System:
OS: macOS 11.6
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 390.59 MB / 32.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.1.0 - /var/folders/lr/7jyhbk_17lg2x77xypc8491r0000gn/T/yarn--1634756758864-0.5523089500998764/node
Yarn: 1.22.15 - /var/folders/lr/7jyhbk_17lg2x77xypc8491r0000gn/T/yarn--1634756758864-0.5523089500998764/yarn
npm: 7.23.0 - ~/.nvm/versions/node/v16.1.0/bin/npm
Watchman: 2021.09.13.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 15.0, DriverKit 20.4, macOS 11.3, tvOS 15.0, watchOS 8.0
Android SDK:
API Levels: 28, 29, 30, 31
Build Tools: 28.0.3, 29.0.2, 30.0.2, 31.0.0
System Images: android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom, android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom, android-31 | Google APIs Intel x86 Atom_64
Android NDK: Not Found
IDEs:
Android Studio: 2020.3 AI-203.7717.56.2031.7678000
Xcode: 13.0/13A233 - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_302 - /Library/Java/JavaVirtualMachines/temurin-8.jdk/Contents/Home/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.65.1 => 0.65.1
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Steps to reproduce

create a sections data array where one of the data keys in a section if of a different type structure than another.

Snack, code example, screenshot, or link to a repository

Snack Example

@react-native-bot react-native-bot added Component: SectionList Needs: Author Feedback Needs: Environment Info Please run `react-native info` and edit your issue with that command's output. and removed Needs: Triage 🔍 labels Oct 20, 2021
@github-actions
Copy link

⚠️ Missing Environment Information
ℹ️ Your issue may be missing information about your development environment. You can obtain the missing information by running react-native info in a console.

@CoryWritesCode
Copy link
Author

Reformatted but it's there

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Oct 21, 2021
@github-actions
Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Apr 20, 2022
@react-native-bot react-native-bot removed the Needs: Environment Info Please run `react-native info` and edit your issue with that command's output. label Apr 20, 2022
@CoryWritesCode
Copy link
Author

This is not stale

@github-actions github-actions bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Apr 21, 2022
Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Mar 30, 2024
Copy link

github-actions bot commented Apr 8, 2024

This issue was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 8, 2024
@CoryWritesCode
Copy link
Author

sad :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: SectionList Needs: Attention Issues where the author has responded to feedback. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

2 participants