Skip to content

fix: add ability to use custom flatlist implementation#170

Closed
arpitv96171 wants to merge 12 commits into
10play:mainfrom
esan-tech-india:add-ability-to-use-custom-flatlist
Closed

fix: add ability to use custom flatlist implementation#170
arpitv96171 wants to merge 12 commits into
10play:mainfrom
esan-tech-india:add-ability-to-use-custom-flatlist

Conversation

@arpitv96171

@arpitv96171 arpitv96171 commented Jul 27, 2024

Copy link
Copy Markdown
Contributor

Add ability to use custom Flatlist as component with example

Before: Flatlist does not scroll when used inside bottomsheet

Screen.Recording.2024-07-27.at.22.31.55.mov

After: Using BottomSheetFlatlist which scrolls when used inside @gorhom/bottom-sheet

Screen.Recording.2024-07-27.at.22.32.16.mov

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's revert this? no need to change the bundle of the advanced example editor

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -0,0 +1,57 @@
import BottomSheet, { BottomSheetFlatList } from '@gorhom/bottom-sheet';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice ! can we also add it to the doc website? with explanations code snippet and maybe a gif?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

Comment thread example/src/App.tsx
))}
</Stack.Navigator>
</NavigationContainer>
<GestureHandlerRootView style={homeStyles.root}>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why needed? (maybe a dumb question)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the primary setup requirement to ensure react-native-gesture-handler works in the app (which is the dependency of @gorhom/bottom-sheet)

editor,
hidden = undefined,
items = DEFAULT_TOOLBAR_ITEMS,
ListComponent = FlatList,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great ability regardless the bottom-sheet, can we add this to the props table on: https://10play.github.io/10tap-editor/docs/api/Components#toolbar

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@GuySerfaty GuySerfaty left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arpitv96171 - first of all thank you very much for that contribution, this is something I was planning to do anyway!

I left some small comments and questions.
would love @17Amir17 to take a look as well

@GuySerfaty

Copy link
Copy Markdown
Contributor

@arpitv96171 - commits should follow the commit message convention
https://github.com/10play/10tap-editor/blob/main/CONTRIBUTING.md#commit-message-convention

Same on the other PR both of them all of the commit should start with fix:
both PRs should be patch bump on the lib version

@arpitv96171 arpitv96171 changed the title Add ability to use custom flatlist fix: add ability to use custom flatlist implementation Jul 28, 2024
@arpitv96171 arpitv96171 requested a review from GuySerfaty July 28, 2024 10:40
@arpitv96171

Copy link
Copy Markdown
Contributor Author

new PR #173

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants