Skip to content

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

mobile: fix crash on changing numColumns

ammarahm-ed0fd077dc396b
diff --git a/apps/mobile/app/components/properties/items.js b/apps/mobile/app/components/properties/items.js
index 3a76e2a02..2024aef46 100644
--- a/apps/mobile/app/components/properties/items.js
+++ b/apps/mobile/app/components/properties/items.js
@@ -21,6 +21,7 @@ import React from "react";
import { View } from "react-native";
import { FlatList } from "react-native-gesture-handler";
import Icon from "react-native-vector-icons/MaterialCommunityIcons";
+import { getRandomId } from "../../common/filesystem/utils";
import { useActions } from "../../hooks/use-actions";
import { DDS } from "../../services/device-detection";
import { useSettingStore } from "../../stores/use-setting-store";
@@ -111,6 +112,7 @@ export const Items = ({ item, buttons, close }) => {
return item.type === "note" ? (
<FlatList
data={data}
+ key={`note_prop_list_${buttons.length}`}
keyExtractor={(item) => item.title}
numColumns={buttons.length < 5 ? buttons.length : columnItemsCount}
style={{