Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

mobile: fix tags not showing properly

Ammar Ahmed0251363d651b
diff --git a/apps/mobile/app/components/sheets/manage-tags/index.tsx b/apps/mobile/app/components/sheets/manage-tags/index.tsx
index ea56ce1bc..ec47744b5 100644
--- a/apps/mobile/app/components/sheets/manage-tags/index.tsx
+++ b/apps/mobile/app/components/sheets/manage-tags/index.tsx
@@ -30,7 +30,8 @@ import React, {
useState
} from "react";
import { TextInput, View, useWindowDimensions } from "react-native";
-import { ActionSheetRef, FlatList } from "react-native-actions-sheet";
+import { ActionSheetRef } from "react-native-actions-sheet";
+import { FlashList } from "react-native-actions-sheet/dist/src/views/FlashList";
import Icon from "react-native-vector-icons/MaterialCommunityIcons";
import { db } from "../../../common/database";
import { useDBItem } from "../../../hooks/use-db-item";
@@ -301,37 +302,42 @@ const ManageTagsSheet = (props: {
</Pressable>
) : null}
- <FlatList
- data={tags?.placeholders}
+ <View
style={{
- width: "100%"
+ width: "100%",
+ flexGrow: 1,
+ height: "100%"
}}
- keyboardShouldPersistTaps
- keyboardDismissMode="interactive"
- keyExtractor={(item) => item + "_tag"}
- renderItem={renderTag}
- ListEmptyComponent={
- <View
- style={{
- width: "100%",
- height: 200,
- justifyContent: "center",
- alignItems: "center"
- }}
- >
- <Heading size={50} color={colors.secondary.heading}>
- #
- </Heading>
- <Paragraph
- textBreakStrategy="balanced"
- color={colors.secondary.paragraph}
+ >
+ <FlashList
+ data={tags?.placeholders}
+ keyboardShouldPersistTaps
+ keyboardDismissMode="interactive"
+ estimatedItemSize={50}
+ renderItem={renderTag}
+ ListEmptyComponent={
+ <View
+ style={{
+ width: "100%",
+ height: 200,
+ justifyContent: "center",
+ alignItems: "center"
+ }}
>
- You do not have any tags.
- </Paragraph>
- </View>
- }
- ListFooterComponent={<View style={{ height: 50 }} />}
- />
+ <Heading size={50} color={colors.secondary.heading}>
+ #
+ </Heading>
+ <Paragraph
+ textBreakStrategy="balanced"
+ color={colors.secondary.paragraph}
+ >
+ You do not have any tags.
+ </Paragraph>
+ </View>
+ }
+ ListFooterComponent={<View style={{ height: 50 }} />}
+ />
+ </View>
</View>
);
};
diff --git a/apps/mobile/app/package.json b/apps/mobile/app/package.json
index ca178c779..51ddeccda 100644
--- a/apps/mobile/app/package.json
+++ b/apps/mobile/app/package.json
@@ -16,7 +16,7 @@
"html-to-text": "9.0.5",
"phone": "^3.1.14",
"qclone": "^1.2.0",
- "react-native-actions-sheet": "0.9.2",
+ "react-native-actions-sheet": "0.9.3",
"react-native-check-version": "https://github.com/flexible-agency/react-native-check-version",
"react-native-drax": "^0.10.2",
"react-native-image-zoom-viewer": "^3.0.1",